<commit_before>import PropTypes from 'prop-types';

class Ability {
  static propTypes = {
    /**
     * REQUIRED The spell definition. If an array of spell definitions is provided, the first element in the array will be what shows in suggestions / cast timeline. Multiple spell definitions in the same ability can be used to tie multiple cast / buff IDs together as the same ability (with a shared cooldown)
     */
    spell: PropTypes.oneOfType([
      PropTypes.shape({
        id: PropTypes.number.isRequired,
        name: PropTypes.string.isRequired,
        icon: PropTypes.string.isRequired,
      }),
      PropTypes.arrayOf(PropTypes.shape({
        id: PropTypes.number.isRequired,
        name: PropTypes.string.isRequired,
        icon: PropTypes.string.isRequired,
      })),
    ]).isRequired,
    /**
     * The name to use if it is different from the name provided by the `spell` object. This should only be used in rare situations.
     */
    name: PropTypes.string,
    /**
     * REQUIRED The name of the category to place this spell in, you should usually use the SPELL_CATEGORIES enum for these values.
     */
    category: PropTypes.string.isRequired,
    /**
     * The cooldown of a spell at the time of the call, this can be a function for more complicated calls or even to check for buffs. Parameters provided: `hastePercentage`, `selectedCombatant`
     */
    cooldown: PropTypes.oneOfType([
      PropTypes.func,
      PropTypes.number,
    ]),
    /**
     * NYI, do not use
     */
    channel: PropTypes.oneOfType([
      PropTypes.func,
      PropTypes.number,
    ]),
    /**
     * The amount of charges the spell has by default. Reminder: only 1 charge will recharge at a time, so a spell having multiple charges will only have the amount of charges as extra possible casts during a fight.
     */
    charges: PropTypes.number,
    /**
     * Whether the spell is on the GCD.
     * If this spell overlaps in the Spell Timeline it likes is incorrectly marked as on the GCD and should be removed.
     */
    isOnGCD: PropTypes.bool,
    // TODO: Add properties `staticGCD` and `baseGcd` since the baseGcd can be different per spell (e.g. Brewmaster's Effuse has a 1.5sec base GCD and most other spells are 1sec)
    castEfficiency: PropTypes.shape({
      /**
       * If this is set to `true`, this spell will trigger a Cast Efficiency suggestion when the efficiency is below the set threshold (with one of the props below, or the default 80%).
       */
      suggestion: PropTypes.bool,
      /**
       * The custom recommended cast efficiency. Default is 80% (0.8).
       */
      recommendedEfficiency: PropTypes.number,
      averageIssueEfficiency: PropTypes.number,
      majorIssueEfficiency: PropTypes.number,
      /**
       * Extra suggestion text for after the Cast Efficiency suggestion. Use this for example to give the user a reason why.
       */
      extraSuggestion: PropTypes.node,
      /**
       * A function to get the amount of casts done of a spell. Parameters provided: `castCount`, `parser`
       * DEPRECATED: Usage should be avoided. This may be removed in the future.
       */
      casts: PropTypes.func,
      /**
       * A function to get the max amount of casts for a spell. Parameters provided: `cooldown`, `fightDuration`, `getAbility`, `parser`
       * DEPRECATED: Usage should be avoided. This may be removed in the future.
       */<commit_msg>Comments<commit_after>import PropTypes from 'prop-types';

class Ability {
  static propTypes = {
    /**
     * REQUIRED The spell definition. If an array of spell definitions is provided, the first element in the array will be what shows in suggestions / cast timeline. Multiple spell definitions in the same ability can be used to tie multiple cast / buff IDs together as the same ability (with a shared cooldown)
     */
    spell: PropTypes.oneOfType([
      PropTypes.shape({
        id: PropTypes.number.isRequired,
        name: PropTypes.string.isRequired,
        icon: PropTypes.string.isRequired,
      }),
      PropTypes.arrayOf(PropTypes.shape({
        id: PropTypes.number.isRequired,
        name: PropTypes.string.isRequired,
        icon: PropTypes.string.isRequired,
      })),
    ]).isRequired,
    /**
     * The name to use if it is different from the name provided by the `spell` object. This should only be used in rare situations.
     */
    name: PropTypes.string,
    /**
     * REQUIRED The name of the category to place this spell in, you should usually use the SPELL_CATEGORIES enum for these values.
     */
    category: PropTypes.string.isRequired,
    /**
     * The cooldown of a spell at the time of the call, this can be a function for more complicated calls or even to check for buffs. Parameters provided: `hastePercentage`, `selectedCombatant`
     */
    cooldown: PropTypes.oneOfType([
      PropTypes.func,
      PropTypes.number,
    ]),
    /**
     * NYI, do not use
     */
    channel: PropTypes.oneOfType([
      PropTypes.func,
      PropTypes.number,
    ]),
    /**
     * The amount of charges the spell has by default. Reminder: only 1 charge will recharge at a time, so a spell having multiple charges will only have the amount of charges as extra possible casts during a fight.
     */
    charges: PropTypes.number,
    /**
     * Whether the spell is on the GCD.
     * If this spell overlaps in the Spell Timeline it likes is incorrectly marked as on the GCD and should be removed.
     */
    isOnGCD: PropTypes.bool,
    // TODO: Add properties `staticGCD` and `baseGcd` since the baseGcd can be different per spell (e.g. Brewmaster's Effuse has a 1.5sec base GCD and most other spells are 1sec)
    castEfficiency: PropTypes.shape({
      /**
       * If this is set to `true`, this spell will trigger a Cast Efficiency suggestion when the efficiency is below the set threshold (with one of the props below, or the default 80%).
       */
      suggestion: PropTypes.bool,
      /**
       * The custom recommended cast efficiency. Default is 80% (0.8).
       */
      recommendedEfficiency: PropTypes.number,
      averageIssueEfficiency: PropTypes.number,
      majorIssueEfficiency: PropTypes.number,
      /**
       * Extra suggestion text for after the Cast Efficiency suggestion. Use this for example to give the user a reason why.
       */
      extraSuggestion: PropTypes.node,
      /**
       * A function to get the amount of casts done of a spell. Parameters provided: `castCount`, `parser`
       * @deprecated Usage should be avoided. This may be removed in the future.
       */
      casts: PropTypes.func,
      /**
       * A function to get the max amount of casts for a spell. Parameters provided: `cooldown`, `fightDuration`, `getAbility`, `parser`
       * @deprecated Usage should be avoided. This may be removed in the future.
       */
{'fraction_non_alphanumeric': 0.07926562727670115, 'fraction_numerical': 0.0029141774734081304, 'mean_word_length': 2.668626402993052, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3933352', 'n_tokens_mistral': 1836, 'n_tokens_neox': 1830, 'n_words': 796}