Skip to content

Redundant open modes#2121

Closed
Avasam wants to merge 1 commit intomhammond:mainfrom
Avasam:redundant-open-modes
Closed

Redundant open modes#2121
Avasam wants to merge 1 commit intomhammond:mainfrom
Avasam:redundant-open-modes

Conversation

@Avasam
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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