File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,8 @@ Example::
200
200
max-line-length = 160
201
201
statistics = True
202
202
203
- At the project level, a ``setup.cfg `` file or a ``tox.ini `` file is read if
203
+ At the project level, a ``setup.cfg `` file or a ``tox.ini ``
204
+ (or a ``pyproject.toml `` if running python 3.11+) file is read if
204
205
present. If none of these files have a ``[pycodestyle] `` section, no project
205
206
specific configuration is loaded.
206
207
Original file line number Diff line number Diff line change 60
60
from fnmatch import fnmatch
61
61
from functools import lru_cache
62
62
from optparse import OptionParser
63
+ if sys .version_info >= (3 , 11 ):
64
+ import tomllib
63
65
64
66
# this is a performance hack. see https://bugs.python.org/issue43014
65
67
if (
83
85
except ImportError :
84
86
USER_CONFIG = None
85
87
86
- PROJECT_CONFIG = ('setup.cfg' , 'tox.ini' )
88
+ if sys .version_info >= (3 , 11 ):
89
+ PROJECT_CONFIG = ('setup.cfg' , 'tox.ini' , 'pyproject.toml' )
90
+ else :
91
+ PROJECT_CONFIG = ('setup.cfg' , 'tox.ini' )
92
+
87
93
MAX_LINE_LENGTH = 79
88
94
# Number of blank lines between various code parts.
89
95
BLANK_LINES_CONFIG = {
You can’t perform that action at this time.
0 commit comments