Skip to content
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

Redundant open modes #2121

Closed
wants to merge 1 commit into from
Closed

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Sep 21, 2023

From #2100 (comment)
Automated changes ran using ruff . --select=UP015 --exclude=Pythonwin/Scintilla --fix (Ruff re-implements pyupgrade and is configurable)
https://docs.astral.sh/ruff/rules/redundant-open-modes/

@mhammond
Copy link
Owner

Sorry I didn't mention this in the referenced comment, but I'm fairly luke-warm on this - I really don't see a problem that some people might prefer explicit "r" and some might prefer to specify no args in that case. There can't be any confusion, so I'm really not sure this is actually adding value versus change for change's sake.

@Avasam
Copy link
Collaborator Author

Avasam commented Sep 22, 2023

No problem! You can close this PR if you'd like and the decision will be documented as such. (I myself prefer being explicit with open)
I do think eventually implementing Flake8/Ruff (honestly Ruff is the go-to at this point, more linting coverage, formatter improvements over black, less checkers, much faster) in the CI at some point is a good idea. And this rule can then be excluded (referencing this conversation). Unlike pyupgrade which is barely configurable.

@Avasam Avasam closed this Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants