flake8-coding
flake8-coding copied to clipboard
`accept-encodings` not working correctly with toml
The accept-encodings
option is not getting correctly registered with flake.
Run 1. When I configure the package through pyproject.toml
, i see that settings for accept-encodings
are not accepted.
[tool.flake8]
accept-encodings = 'utf-8,utf-16'
verbose output:
flake8.options.manager MainProcess 162 DEBUG Registered option "Option(--accept-encodings, action='store', default='latin-1, utf-8', help='Acceptable source code encodings for `coding:` magic comment')".
flake8.options.manager MainProcess 162 DEBUG Registered option "Option(--no-accept-encodings, action='store_true', help='Warn for files containing a `coding:` magic comment')".
.
.
.
flake8.options.config MainProcess 165 DEBUG Option "accept-encodings" is not registered. Ignoring.
Run 2. Strangely, when i use the no-accept-encodings
option in my config, it works fine.
[tool.flake8]
no-accept-encodings = true
verbose output:
flake8.options.manager MainProcess 165 DEBUG Registered option "Option(--accept-encodings, action='store', default='latin-1, utf-8', help='Acceptable source code encodings for `coding:` magic comment')".
flake8.options.manager MainProcess 165 DEBUG Registered option "Option(--no-accept-encodings, action='store_true', help='Warn for files containing a `coding:` magic comment')".
.
.
.
flake8.options.config MainProcess 168 DEBUG Option "no-accept-encodings" returned value: True
.
.
.
flake8.options.aggregator MainProcess 168 DEBUG Overriding default value of (False) for "no_accept_encodings" with (True)
version info
$ flake8 --version
5.0.4 (Flake8-pyproject: 1.2.2, flake8-coding: 1.3.2, flake8-copyright: 0.2.3, flake8-requirements: 1.7.6, mccabe: 0.7.0, pycodestyle: 2.9.1, pyflakes: 2.5.0) CPython 3.8.10
on Linux