-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
@@ -111,7 +111,7 @@ def test_pickle_wrapper(self): | |||
res_unpickled = self.results.__class__.load(fh) | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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