-
-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Expected behavior
Use CSV for .flake8
ie: ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
Current behavior
ignore-names=["closeEvent", "paintEvent", "keyPressEvent", "mousePressEvent", "mouseMoveEvent", "mouseReleaseEvent"]
or an error if I try to configure nitpick.files.".flake8"
https://github.com/Avasam/nitpick.styles/blob/main/python.toml:1: NIP001 has an incorrect style. Invalid config:
nitpick.files.".flake8": Unknown file. See https://nitpick.rtfd.io/en/latest/nitpick_section.html#nitpick-files.
Violations: ❌ 1 to change manually.
Steps to reproduce
# This throws an error when running `nitpick check`
[nitpick.files.".flake8"]
comma_separated_values = ["flake8.ignore-names"]
[".flake8".flake8]
# PyQt methods
ignore-names = ["closeEvent", "paintEvent", "keyPressEvent", "mousePressEvent", "mouseMoveEvent", "mouseReleaseEvent"]- Configure nitpick TOML style as above
- Run
nitpick check
Possible Solution
Temporary workaround: I could use strings instead in the toml config, but then I lose the ability to have partial lists (where the user of my nitpick style could add more to ignore-names), as well as multiline configs.
I could just switch to Flake9 or FlakeHeaven to support TOML config given that Flake8's config files are a mess in the first place 😝
But a proper working solution for .flake8 would be nice.
Context
I'm trying to enforce the following config in .flake8:
[flake8]
ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
Your environment
nitpickversion used: 0.32.0- Python version: Python 3.9.13
- Operating System and version: Windows 10.0.19044
- Link to your project:
For more information, see the CONTRIBUTING guide.
Metadata
Metadata
Assignees
Labels
Projects
Status