-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
MNT: last of the python2 cleanups #2392
Conversation
Using this darling: gsed -i -e 's|\(.*super(\)\(.*)\.\)\(.*)\)|\1).\3|g'
Codecov Report
@@ Coverage Diff @@
## main #2392 +/- ##
=======================================
Coverage 62.87% 62.87%
=======================================
Files 133 133
Lines 17246 17246
=======================================
Hits 10844 10844
Misses 6402 6402
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
@@ -3,7 +3,7 @@ | |||
__all__ = ['DummyHandler'] | |||
|
|||
|
|||
class DummyHandler(object): | |||
class DummyHandler(): |
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.
The following would be equivalent, but shorter:
class DummyHandler(): | |
class DummyHandler: |
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.
oh, sure. Thanks!
astroquery/query.py
Outdated
@@ -114,7 +114,7 @@ def from_cache(self, cache_location): | |||
response = pickle.load(f) | |||
if not isinstance(response, requests.Response): | |||
response = None | |||
except IOError: # TODO: change to FileNotFoundError once drop py2 support | |||
except OSError: # TODO: change to FileNotFoundError once drop py2 support |
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.
The comment here suggests using a more specific subclass of OSError
, it might be a good idea to do the same elsewhere too.
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.
Hah, sed
doesn't read the comments :)
I'm addressing the URL sanitizing issue separately in #2394 |
This is to close #1870