mdanalysis
mdanalysis copied to clipboard
Enable Pylint warnings
This is a list of good sounding pylint warnings we might want to enable
- [ ] arguments-differ,
- [ ] assignment-from-none,
- [ ] bad-builtin,
- [ ] bad-indentation,
- [ ] bad-super-call,
- [ ] bare-except,
- [ ] basestring-builtin,
- [ ] broad-except,
- [ ] deprecated-lambda,
- [ ] expression-not-assigned,
- [ ] filter-builtin-not-iterating,
- [ ] function-redefined,
- [ ] indexing-exception,
- [x] map-builtin-not-iterating, #1302
- [ ] next-method-called,
- [x] no-absolute-import, #1294
- [x] old-division, #1293
- [x] print-statement, #1302
- [ ] property-on-old-class,
- [x] range-builtin-not-iterating, #1302
- [ ] redefined-builtin,
- [ ] redefined-outer-name,
- [ ] reduce-builtin,
- [ ] reimported,
- [x] relative-import, #1294
- [ ] round-builtin,
- [ ] super-init-not-called,
- [ ] unnecessary-lambda,
- [ ] unnecessary-semicolon,
- [ ] unpacking-non-sequence,
- [ ] unused-argument,
- [ ] unused-import, #4518
- [ ] unused-variable,
- [ ] unused-wildcard-import,
- [ ] used-before-assignment,
- [ ] wildcard-import,
- [x] xrange-builtin, #1302
- [x] zip-builtin-not-iterating, #1302
We have been linting for a while. Can we close this issue?
we haven't enabled all of them. For example I would like to enable unused import
or bad super call
to find more code pieces that could need work. I never found the time. This is a good issue for hacktober fest. Just enable a single lint option and fix all the warnings. We can have a PR for every option enabled.
Not all will make sense though. unused argument
could cause trouble because our API doesn't use all variables for all sub-classes.
Then we keep this issue open as a master issue and create new ones for individual linter warnings, similar to what we've been doing with testing of exceptions.
@orbeckst @kain88-de I am willing to initiate work on this issue. I wanted to know if we can configure the prospector tool under this issue since we can get to manipulate the strictness?
What is the "prospector tool"? Can you elaborate? Explain what you want to do, include links as relevant.
Are the warnings unused import and unused variable still open, can I work on them?
Are the warnings unused import and unused variable still open, can I work on them?
I think so. Create a PR, enable the warnings, and then start fixing them. When you open your PR, mention this issue (#1295) in the description so that we see it here. In general we don't "reserve" work but simply look at the first PR that comes in. Nevertheless, communicating with each other is good (like you did), especially when coming new into a project.
Note that there's a closed PR #4111 where someone else attempted work — I'd suggest to also look at that PR to learn from it.
I will try fixing them and open PR as you said