tosh1ki/pyogi

View on GitHub
pyogi/warscrawler.py

Summary

Maintainability
A
2 hrs
Test Coverage

Function wcsa_to_csa has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    def wcsa_to_csa(self, d):
        '''将棋ウォーズ専用?のCSA形式を一般のCSA形式に変換する.

        Args
        ----------
Severity: Minor
Found in pyogi/warscrawler.py - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function get_html has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def get_html(self, url):
        '''指定したurlのhtmlを取得する
        '''
        time.sleep(self.INTERVAL_TIME)

Severity: Minor
Found in pyogi/warscrawler.py - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function get_kifu_url has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def get_kifu_url(self, users, gtype, csvpath,
Severity: Minor
Found in pyogi/warscrawler.py - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status