Fix exclusion in Flake8 configuration#16087
Merged
Merged
Conversation
seanbudd
reviewed
Jan 23, 2024
| exclude = # don't bother looking in the following subdirectories / files. | ||
| # indentation contains tabs | ||
| W191, | ||
| # line break before binary operator. We want W504(line break after binary operator) |
Member
There was a problem hiding this comment.
Suggested change
| # line break before binary operator. We want W504(line break after binary operator) | |
| # line break before binary operator. | |
| # We want W504 (line break after binary operator) |
| miscDeps, | ||
| source/louis, | ||
| source/comInterfaces/*, # #10924: generated by third-party dependencies | ||
| ../../include/*, |
Member
There was a problem hiding this comment.
Suggested change
| ../../include/*, | |
| # When excluding concrete paths (i.e not each folder named `__pycache__`) | |
| # paths are relative to the configuration file. | |
| ../../include/*, |
Member
|
Thanks @lukaszgo1 |
seanbudd
reviewed
Jan 25, 2024
See test results for failed build of commit 3f626e4d21 |
Nael-Sayegh
pushed a commit
to Nael-Sayegh/nvda
that referenced
this pull request
Feb 15, 2024
Related to nvaccess#16071 Summary of the issue: When linting we exclude certain directories where the code is auto generated. These exclusions are not working (this probably regressed with the Flake8 update, though I haven't checked). Description of user facing changes When linting exclusions in Flake8 configuration are once again respected. Description of development approach Flake8 considers that paths in the exclusion list are provided relative to the config file location not to the CWD, our exclusions were modified to account for this After the file was modified I started getting errors due to usage of inline comments, apparently this was never supposed to work, as per this quote from the documentation: Following the recommended settings for Python’s configparser, Flake8 does not support inline comments for any of the keys. So while this is fine:... Therefore we no longer use inline comments in the config.
SaschaCowley
pushed a commit
to SaschaCowley/nvda
that referenced
this pull request
Feb 27, 2024
Related to nvaccess#16071 Summary of the issue: When linting we exclude certain directories where the code is auto generated. These exclusions are not working (this probably regressed with the Flake8 update, though I haven't checked). Description of user facing changes When linting exclusions in Flake8 configuration are once again respected. Description of development approach Flake8 considers that paths in the exclusion list are provided relative to the config file location not to the CWD, our exclusions were modified to account for this After the file was modified I started getting errors due to usage of inline comments, apparently this was never supposed to work, as per this quote from the documentation: Following the recommended settings for Python’s configparser, Flake8 does not support inline comments for any of the keys. So while this is fine:... Therefore we no longer use inline comments in the config.
Adriani90
pushed a commit
to Adriani90/nvda
that referenced
this pull request
Mar 13, 2024
Related to nvaccess#16071 Summary of the issue: When linting we exclude certain directories where the code is auto generated. These exclusions are not working (this probably regressed with the Flake8 update, though I haven't checked). Description of user facing changes When linting exclusions in Flake8 configuration are once again respected. Description of development approach Flake8 considers that paths in the exclusion list are provided relative to the config file location not to the CWD, our exclusions were modified to account for this After the file was modified I started getting errors due to usage of inline comments, apparently this was never supposed to work, as per this quote from the documentation: Following the recommended settings for Python’s configparser, Flake8 does not support inline comments for any of the keys. So while this is fine:... Therefore we no longer use inline comments in the config.
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:
Related to #16071
Summary of the issue:
When linting we exclude certain directories where the code is auto generated. These exclusions are not working (this probably regressed with the Flake8 update, though I haven't checked).
Description of user facing changes
When linting exclusions in Flake8 configuration are once again respected.
Description of development approach
Therefore we no longer use inline comments in the config.
Testing strategy:
Performed lint on the code from #16071 - ensured that
comInterfacesare ignored as they should be.Known issues with pull request:
None known
Code Review Checklist: