python-stdnum
python-stdnum copied to clipboard
Fix CI issues after flake8 update 5 → 6
https://github.com/PyCQA/flake8/issues/1760
- Fix incorrect
setup.cfg
syntax. - Plugin flake8-quotes is currently incompatible with flake8 v6. Work around by pinning flake8 until https://github.com/zheller/flake8-quotes/pull/111 is merged.
Fixes #342.
For now I've pushed 7a91a98 to keep the working flake8. I'm not happy about the dropping of support for inline comments in the ignore list in flake8 because it makes the ignore list much more difficult to manage and I'm hoping the support for comments will be restored at some point.
Support for comments will not be restored. Such comments are considered to be a syntax error.
See https://github.com/PyCQA/flake8/issues/1750.
I've seen those comments and I think they are wrong. ;) Similar inline comments are supported in a lot of places in tox.ini or setup.cfg so I don't see why a list of ignores in flake8 is so special that we should expect different behaviour.
If the maintainer thinks otherwise, this will not be fixed. We need arguments from the documentation or normative documents such as PEPs.
The Python Packaging User Guide doesn't say much on the subject:
setup.cfg
is an ini file that contains option defaults forsetup.py
commands. For an example, see the setup.cfg in the PyPA sample project.
The Python documentation, in Syntax of config files, is even less informative:
The Distutils configuration files all have the same syntax. The config files are grouped into sections. There is one section for each Distutils command, plus a
global
section for global options that affect every command. Each section consists of one option per line, specified asoption=value
.
Unfortunately, INI files lack a real standard. From Wikipedia:
In some implementations, a comment may begin anywhere on a line after a space (inline comments), including on the same line after properties or section declarations.
var = a ; This is an inline comment foo = bar # This is another inline comment
In others, including the WinAPI function GetPrivateProfileString, comments must occur on lines by themselves.
Update to require flake8-quotes>=3.3.2
to be compatible with flake8 6.0.
I don't know how to require this version only for flake8>=6
.