maestro-server/analytics-maestro

View on GitHub
app/libs/patterns/chessHorse.py

Summary

Maintainability
A
0 mins
Test Coverage
F
14%

Line too long (95 > 79 characters)
Open

            nstep = self.chess_horse_recursive_y(start_search_y, end_search_y, mypos[0], label)
Severity: Minor
Found in app/libs/patterns/chessHorse.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

No newline at end of file
Open

        return (last_node == False or last_node == node)
Severity: Minor
Found in app/libs/patterns/chessHorse.py by pep8

Trailing blank lines are superfluous.

Okay: spam(1)
W391: spam(1)\n

However the last line should end with a new line (warning W292).

Comparison to false should be 'if cond is false:' or 'if not cond:'
Open

        return (last_node == False or last_node == node)
Severity: Minor
Found in app/libs/patterns/chessHorse.py by pep8

Comparison to singletons should use "is" or "is not".

Comparisons to singletons like None should always be done
with "is" or "is not", never the equality operators.

Okay: if arg is not None:
E711: if arg != None:
E711: if None == arg:
E712: if arg == True:
E712: if False == arg:

Also, beware of writing if x when you really mean if x is not None
-- e.g. when testing whether a variable or argument that defaults to
None was set to some other value.  The other value might have a type
(such as a container) that could be false in a boolean context!

There are no issues that match your filters.

Category
Status