-
Notifications
You must be signed in to change notification settings - Fork 356
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
Tidy up of unused imports #5002
Tidy up of unused imports #5002
Conversation
Can the new action effectively replace the old Code Climate checks? |
Co-authored-by: Tito Dal Canton <[email protected]>
At the moment, it is looking for unused imports only (the select=F401 flag), but it may be able to replace these eventually. It hasn't actually picked up the action though, so I will try to work out why |
To comment on codeclimate ... It is easy to run the tools that it uses ... They are all open source standard tools etc. It is not so easy to parse the results, figure out what complaints (there will be many complaints) are new and what are pre-existing, and present this to the user (with a pass/fail). Doing all this in a GUI is the value that CodeClimate (or the older thing, who's name I forgot) adds, and is the bit that is not open source. |
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.
TL:DR
Remove unused imports from codes throughout the repository
This should save time during the running of the codes, as well as helping move towards a code-checked-before-merging model.
Standard information about the request
This change should have absolutely no effect, but changes are in every part of the code base
This change: follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines
Motivation
Want to start improving quality and checking whether submitted code meets quality requirements
Contents
Used flake8 to find unused imports, if there were any, then get rid of them
The files chosen were:
bin
which started withpycbc_
pycbc
which ends.py
, but ignore any__init__.py
or the specialversion.py
test
which ends.py
- ignore the scheme testing as that uses try/except-wrapped imports, which fail flake8Links to any issues or associated PRs
Issue raised in #4999