-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
simple fix: Update argparse.py #130620
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
simple fix: Update argparse.py #130620
Conversation
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.
This makes sense, but I'm also not sure if this counts as a cosmetic change. (I'd rather not inspire a bunch of copycat PRs switching not x in y to x not in y, depending on how many of those we have.)
@picnixz, do you know the rules/procedure here?
|
In general, we don't accept changes which are only "coding style" changes. But then if a core dev wants the change, why not. It's not a big deal. I would just suggest to not backport such coding style changes. |
|
I mean, obviously it should go without saying that this PR does not fix a regression, nor even a bug, so it makes no sense to backport it under any circumstances. It is very much cosmetic either way. The only thing that cares about this change is a style linter. Personally, I would suggest accepting cosmetic style changes to codebases... but Python's contribution policy discourages such. And it feels a bit weird to say "no, don't do it" and then accept a PR if someone does in fact do it anyway. |
We usually accept coding style changes in the middle of changes which fix bugs or add new features. |
For the modules I personally maintain and touch a lot, I don't mind when someone changes something like that because it's still ugly. For instance, we say that we accept changes when we touch the code around, but sometimes that code would never be touched in the future. Now, in this case, |
|
We usually do not accept pure cosmetic changes, as it leads to code churn and encourages other changes that lead to more code churn. The style of this expression can be changed if that line or some of near lines be changed for other reasons, or in a global clean up performed by a maintainer (wery rarely). |
|
Considering that Victor seems neutral on that, that I am neutral as well, but that the main maintainer of argparse did not explicitly approve the PR, I suggest closing this one (the module evolves sufficiently fast that we can probably hit the line sometime in the future. (Note that the last change around that line was 5 months ago so we could have change it at that time) |
|
I'm against this change. |
I guess that solves the pending label. Closing since no core dev endorsed that change while others weren't really convinced. |
simple fix:
not ... in ...=>... not in ...