Update codingStandards to remove instruction to double indent function parameters, and to note instructions for nameing scripts.#17126
Merged
seanbudd merged 3 commits intoSep 9, 2024
Conversation
added 2 commits
September 6, 2024 01:41
…n parameters, and to note instructions for nameing scripts.
SaschaCowley
approved these changes
Sep 6, 2024
SaschaCowley
left a comment
Member
There was a problem hiding this comment.
Thanks for these changes, @XLTechie
I'm not a fan of letting our tools bully us into changing the way we work, but this is the path of least resistance, and using Ruff does outweigh this change, methinks.
Collaborator
Author
|
@SaschaCowley Yes, exactly. I don't like at all caving to the tyranny of a tool. But, in this case, it's not really a change worth trying to circumvent. The unindented closing parenthesis indicates the same thing as the double tabs, and there are bigger wars to fight. |
seanbudd
reviewed
Sep 6, 2024
Contributor
|
Maybe a change log entry is not needed. But some communication, e.g. on NVDA dev list, surely would prevent a developer from spending time investigating why the pre-commit has modified their code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
In-response-to #12355 (comment)
Summary of the issue:
Pre-commit-ci, on behalf of Ruff, does not approve of function parameter lists being double indented.
I.e. NVDA's coding standards said:
That resulted in, e.g.:
Pushing a function definition like that to an NVDA PR, would result in Pre-commit-ci "fixing" it, to appear as:
Sean suggested updating coding standards, which is presumably easier than trying to convince Ruff to do it our way.
Description of user facing changes
None
Description of development approach