diff options
author | bors-servo <infra@servo.org> | 2023-06-24 08:54:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-24 08:54:30 +0200 |
commit | 19eeca7b3a79d0bacd0fe31faba89c2cc866dcfe (patch) | |
tree | bd464243c036bc0ec8f8172fd2a9dd0372b658c9 /python | |
parent | edeed11cefba1524abbce55d398574c005b7687a (diff) | |
parent | bf08032b0312af9eb58a1a8f643b2a1c71890331 (diff) | |
download | servo-19eeca7b3a79d0bacd0fe31faba89c2cc866dcfe.tar.gz servo-19eeca7b3a79d0bacd0fe31faba89c2cc866dcfe.zip |
Auto merge of #29920 - sagudev:py-fixups, r=mrobinson
Standalone Flake8 config
Instead of passing flake8 config via CLI flags, I extracted them in flake8 config, so IDE tools can also pick it up.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it is so trivial
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'python')
-rw-r--r-- | python/tidy/tidy.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py index 1e5de4080c0..e0d09f4a7ea 100644 --- a/python/tidy/tidy.py +++ b/python/tidy/tidy.py @@ -325,15 +325,9 @@ def check_flake8(file_name, contents): if not file_name.endswith(".py"): return - ignore = { - "W291", # trailing whitespace; the standard tidy process will enforce no trailing whitespace - "W503", # linebreak before binary operator; replaced by W504 - linebreak after binary operator - "E501", # 80 character line length; the standard tidy process will enforce line length - } - output = "" try: - args = ["flake8", "--ignore=" + ",".join(ignore), file_name] + args = ["flake8", file_name] subprocess.check_output(args, universal_newlines=True) except subprocess.CalledProcessError as e: output = e.output |