GrahamDumpleton / wrapt

A Python module for decorators, wrappers and monkey patching.
BSD 2-Clause "Simplified" License
2.06k stars 231 forks source link

Fix misplaced comparison constant #77

Closed ghost closed 7 years ago

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 93.244% when pulling eb233b6c43fcbad18f9fc09d7be143a0edd30371 on stepshal:misplaced-comparison-constant into 73ab3571d75bee909f0293fafd5221c04b5f5938 on GrahamDumpleton:develop.

GrahamDumpleton commented 8 years ago

I will have to check what this one was meant to do. The order of the comparison is actually quite important, you can't just switch it around as it is testing something different than the original code. It is intended to test conversion of the right hand argument to a type compatible with the comparison to an integer.

GrahamDumpleton commented 7 years ago

Closing as original code is testing for __int__() type conversion wrapper functions. This gets applied to RHS side argument. So changing order is not correct.