-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Removing wrong-import-position Pylint ignore statements. #1255
Removing wrong-import-position Pylint ignore statements. #1255
Conversation
Moving the imports away from the fallback implementations doesn't seem to be a win: let's just disable the check globally. |
It doesn't seem to be a loss either. I had never questioned it before, but moving complexity out of By turning it off we miss out on the goodness of having |
I don't mind ordering the imports that way, but don't believe the dogma that "code must not be in the import section," when it forces us to move the knowledge of the alternative elsewhere. Turning off the checker seems a higher quality result than making the changes with which this PR propitiates it. |
That puts the onus on us to remember, rather than letting us rely on a machine. I think calling it dogma is a bit dramatic. We have tools that help us. Sometimes we take the bad (here: slightly inconvenient) with the good. If the alternative is writing FWIW, I actually like the changes that this hard to understand lint failure encouraged. |
I'm arguing that the relatively low aesthetic value of nicely-sorted imports does not outweigh the damage of moving the fallback implementations far away from the imports they are about: this is a case where the new opinion of the pylint maintainers isn't worth the cost. |
OK. I'll put it in IIRC @jonparrott used a separate lint check for import order? |
Moving the ignore into pylintrc_default.
9602add
to
9a37bad
Compare
@tseaver PTAL |
LGTM |
…-issue Removing wrong-import-position Pylint ignore statements.
Able to address by reducing the complexity of the
except
blocks to make Pylint happy.@tseaver This was a follow up to #1248, which I realized was possible after filing some issues with the Pylint folks.