tophat / codewatch

[deprecated] Monitor and manage deeply customizable metrics about your python code using ASTs
https://codewatch.io
Apache License 2.0
38 stars 3 forks source link

fix Stats != equality check #51

Closed rohitjain closed 5 years ago

rohitjain commented 5 years ago

This fix is needed for a != check in python 2

https://docs.python.org/2/reference/datamodel.html#object.__ne__

There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. Accordingly, when defining __eq__(), one should also define __ne__() so that the operators will behave as expected.
codecov[bot] commented 5 years ago

Codecov Report

Merging #51 into master will increase coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   96.33%   96.35%   +0.02%     
==========================================
  Files           8        8              
  Lines         327      329       +2     
  Branches       46       46              
==========================================
+ Hits          315      317       +2     
  Misses          6        6              
  Partials        6        6
Flag Coverage Δ
#py27 96.35% <100%> (+0.02%) :arrow_up:
#py36 96.35% <100%> (+0.02%) :arrow_up:
Impacted Files Coverage Δ
codewatch/stats.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5c9433c...5c8e1ee. Read the comment docs.