maestro-server/analytics-maestro

View on GitHub
app/libs/histograms/histogram.py

Summary

Maintainability
A
0 mins
Test Coverage
F
43%

No newline at end of file
Open

            return n[1]
Severity: Minor
Found in app/libs/histograms/histogram.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 none should be 'if cond is not none:'
Open

        if self._hist != None:
Severity: Minor
Found in app/libs/histograms/histogram.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