muneebalam/scrapenhl2

View on GitHub

Showing 724 of 747 total issues

Avoid too many return statements within this function.
Open

        return elem[ name ];
Severity: Major
Found in docs/build/_static/jquery-3.1.0.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return None
    Severity: Major
    Found in scrapenhl2/scrape/team_info.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                                  return
      Severity: Major
      Found in scrapenhl2/twitterbot/gamebot.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return None
        Severity: Major
        Found in scrapenhl2/scrape/players.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return df.ID.iloc[0]
          Severity: Major
          Found in scrapenhl2/scrape/players.py - About 30 mins to fix

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                tempaxis.plot(xlimits, [ypos[2], ypos[2]], color='c', ls=':')
            Severity: Minor
            Found in scrapenhl2/plot/rolling_boxcars.py and 2 other locations - About 30 mins to fix
            scrapenhl2/plot/rolling_boxcars.py on lines 62..62
            scrapenhl2/plot/rolling_boxcars.py on lines 63..63

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

                df.loc[:, 'CA60'] = df.CA * 3600 / df.Secs
            Severity: Major
            Found in scrapenhl2/plot/team_score_shot_rate.py and 5 other locations - About 30 mins to fix
            scrapenhl2/plot/defense_pairs.py on lines 255..255
            scrapenhl2/plot/defense_pairs.py on lines 256..256
            scrapenhl2/plot/forward_trios.py on lines 260..260
            scrapenhl2/plot/forward_trios.py on lines 261..261
            scrapenhl2/plot/team_score_shot_rate.py on lines 89..89

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                for direction in ['right', 'top', 'bottom', 'left']:
                    plt.gca().spines[direction].set_visible(False)
            Severity: Minor
            Found in scrapenhl2/plot/team_score_shot_rate.py and 1 other location - About 30 mins to fix
            scrapenhl2/plot/team_score_state_toi.py on lines 60..61

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

                df.loc[:, 'CF60'] = df.CF * 3600 / df.TOI
            Severity: Major
            Found in scrapenhl2/plot/forward_trios.py and 5 other locations - About 30 mins to fix
            scrapenhl2/plot/defense_pairs.py on lines 255..255
            scrapenhl2/plot/defense_pairs.py on lines 256..256
            scrapenhl2/plot/forward_trios.py on lines 261..261
            scrapenhl2/plot/team_score_shot_rate.py on lines 89..89
            scrapenhl2/plot/team_score_shot_rate.py on lines 90..90

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                for spine in ['right', 'left', 'top', 'bottom']:
                    plt.gca().spines[spine].set_visible(False)
            Severity: Minor
            Found in scrapenhl2/plot/team_score_state_toi.py and 1 other location - About 30 mins to fix
            scrapenhl2/plot/team_score_shot_rate.py on lines 61..62

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                centers = forwards.query('Position == "C"').drop('Position', axis=1).iloc[:6, :]
            Severity: Major
            Found in scrapenhl2/plot/usage.py and 3 other locations - About 30 mins to fix
            scrapenhl2/plot/usage.py on lines 52..52
            scrapenhl2/plot/usage.py on lines 115..115
            scrapenhl2/plot/usage.py on lines 116..116

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                if 'start_date' in kwargs:
                    minseason = max(helpers.infer_season_from_date(kwargs['start_date']), minseason)
            Severity: Minor
            Found in scrapenhl2/manipulate/manipulate.py and 1 other location - About 30 mins to fix
            scrapenhl2/manipulate/manipulate.py on lines 350..351

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

                df.loc[:, 'CF60'] = df.CF * 3600 / df.Secs
            Severity: Major
            Found in scrapenhl2/plot/team_score_shot_rate.py and 5 other locations - About 30 mins to fix
            scrapenhl2/plot/defense_pairs.py on lines 255..255
            scrapenhl2/plot/defense_pairs.py on lines 256..256
            scrapenhl2/plot/forward_trios.py on lines 260..260
            scrapenhl2/plot/forward_trios.py on lines 261..261
            scrapenhl2/plot/team_score_shot_rate.py on lines 90..90

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                df = df.drop('Game', axis=1) \
                    .groupby(['Team', 'ScoreState'], as_index=False) \
            Severity: Minor
            Found in scrapenhl2/plot/team_score_shot_rate.py and 1 other location - About 30 mins to fix
            scrapenhl2/plot/team_score_shot_rate.py on lines 86..87

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                df = df.drop('Game', axis=1) \
                    .groupby(['Team', 'ScoreState'], as_index=False) \
            Severity: Minor
            Found in scrapenhl2/plot/team_score_shot_rate.py and 1 other location - About 30 mins to fix
            scrapenhl2/plot/team_score_shot_rate.py on lines 28..29

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

                df.loc[:, 'CA60'] = df.CA * 3600 / df.TOI
            Severity: Major
            Found in scrapenhl2/plot/forward_trios.py and 5 other locations - About 30 mins to fix
            scrapenhl2/plot/defense_pairs.py on lines 255..255
            scrapenhl2/plot/defense_pairs.py on lines 256..256
            scrapenhl2/plot/forward_trios.py on lines 260..260
            scrapenhl2/plot/team_score_shot_rate.py on lines 89..89
            scrapenhl2/plot/team_score_shot_rate.py on lines 90..90

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                df.loc[df.Season != df.PrevSeason, col_dict[series]] = None
            Severity: Minor
            Found in scrapenhl2/plot/rolling_cf_gf.py and 1 other location - About 30 mins to fix
            scrapenhl2/plot/rolling_cf_gf.py on lines 84..84

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Avoid too many return statements within this function.
            Open

                    return rect;
            Severity: Major
            Found in docs/build/_static/jquery-3.1.0.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return None
              Severity: Major
              Found in scrapenhl2/scrape/players.py - About 30 mins to fix

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                    df.loc[:, 'CA60'] = df.CA * 3600 / df.TOI
                Severity: Major
                Found in scrapenhl2/plot/defense_pairs.py and 5 other locations - About 30 mins to fix
                scrapenhl2/plot/defense_pairs.py on lines 255..255
                scrapenhl2/plot/forward_trios.py on lines 260..260
                scrapenhl2/plot/forward_trios.py on lines 261..261
                scrapenhl2/plot/team_score_shot_rate.py on lines 89..89
                scrapenhl2/plot/team_score_shot_rate.py on lines 90..90

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 32.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language