-
-
Notifications
You must be signed in to change notification settings - Fork 423
Description
I cannot believe we didn't have an issue for this, it was on my radar to do when I needed a fun project (I like removing code).
This is a big cleanup effort, but it can be broken down to smaller pieces. Hardly any of the components need any experience with astroquery itself, thus the package-novice label, however, I don't expect this to be a low effort issue. The only ask is to be careful when using automated scripts (2to3) as many of the changes those tools suggest are unnecessary, etc.
I believe we did some cleanups already, and using fstrings, etc, but many parts haven't been cleaned up.
The suggestion would be to comment here what aspect would you pick up on it, e.g. "removing six", etc.
- cleanup future - Remove python 2 __future__ syntax #1864
- cleanup class definitions inherited from
object
- class astroquery inherits from object, can be safely removed from bases in python3(useless object inheritence) #1872 MNT: last of the python2 cleanups #2392 - cleanup six
- cleanup try/excepts and if/elses done for python version
- cleanup any potential encoding related workarounds
- cleanup any potential PEP 3151 (see PEP 3151 astropy#6932 for an example) MNT: last of the python2 cleanups #2392
- cleanup most cases of
super()
as there is no need for classname andself
MNT: last of the python2 cleanups #2392
...
full example of python2 removal things from astropy:
- huge PR: https://github.com/astropy/astropy/pull/6556/files
- list like the above: Remove all Python 2.x items astropy#6234 (comment)