mdanalysis icon indicating copy to clipboard operation
mdanalysis copied to clipboard

Enable Pylint warnings

Open kain88-de opened this issue 7 years ago • 8 comments

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

kain88-de avatar Apr 09 '17 07:04 kain88-de

We have been linting for a while. Can we close this issue?

orbeckst avatar Sep 27 '18 18:09 orbeckst

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.

kain88-de avatar Sep 28 '18 18:09 kain88-de

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 avatar Sep 28 '18 19:09 orbeckst

@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?

aditi2906 avatar Apr 18 '22 13:04 aditi2906

What is the "prospector tool"? Can you elaborate? Explain what you want to do, include links as relevant.

orbeckst avatar Apr 18 '22 22:04 orbeckst

Are the warnings unused import and unused variable still open, can I work on them?

kumarvaastavi avatar Oct 26 '23 11:10 kumarvaastavi

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.

orbeckst avatar Oct 26 '23 19:10 orbeckst

I will try fixing them and open PR as you said

kumarvaastavi avatar Oct 27 '23 10:10 kumarvaastavi