Repository navigation
CLN: Enforce E721, use isinstance - #4925
Conversation
|
in some cases checking 'type' explicitly is intentional, when we don't want to allow for subclasses. I guess in unit tests it's better to require a specific class/type, instead of just being and instance of a class or subclass of it. |
f782a9c to
b6b4069
Compare
Codecov Report
@@ Coverage Diff @@
## master #4925 +/- ##
==========================================
+ Coverage 81.41% 81.41% +<.01%
==========================================
Files 581 581
Lines 90278 90279 +1
Branches 10101 10101
==========================================
+ Hits 73504 73505 +1
Misses 14485 14485
Partials 2289 2289
Continue to review full report at Codecov.
|
8cf08ac to
e44fe02
Compare
b144cd4 to
83177ac
Compare
| fh.close() | ||
| # print type(res_unpickled) | ||
| assert_(type(res_unpickled) is type(self.results)) | ||
| assert_(type(res_unpickled) is type(self.results)) # noqa |
There was a problem hiding this comment.
Print above unnecessary. Worth changing to plain asserts?
Use isinstance instead of comparing types
83177ac to
4478466
Compare
|
as green as it gets. merging @bashtage Thank you |
Use isinstance instead of comparing types