mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-01 11:26:54 +00:00
Latest pycodestyle
This commit is contained in:
parent
532ea9ccab
commit
50e7cc71b9
7 changed files with 21 additions and 4 deletions
|
|
@ -21,6 +21,7 @@ def register_default_options(option_manager):
|
|||
- ``--extend-ignore``
|
||||
- ``--per-file-ignores``
|
||||
- ``--max-line-length``
|
||||
- ``--max-doc-length``
|
||||
- ``--select``
|
||||
- ``--disable-noqa``
|
||||
- ``--show-source``
|
||||
|
|
@ -164,6 +165,16 @@ def register_default_options(option_manager):
|
|||
"(Default: %default)",
|
||||
)
|
||||
|
||||
add_option(
|
||||
"--max-doc-length",
|
||||
type="int",
|
||||
metavar="n",
|
||||
default=None,
|
||||
parse_from_config=True,
|
||||
help="Maximum allowed doc line length for the entirety of this run. "
|
||||
"(Default: %default)",
|
||||
)
|
||||
|
||||
add_option(
|
||||
"--select",
|
||||
metavar="errors",
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class FileProcessor(object):
|
|||
- :attr:`line_number`
|
||||
- :attr:`logical_line`
|
||||
- :attr:`max_line_length`
|
||||
- :attr:`max_doc_length`
|
||||
- :attr:`multiline`
|
||||
- :attr:`noqa`
|
||||
- :attr:`previous_indent_level`
|
||||
|
|
@ -80,6 +81,8 @@ class FileProcessor(object):
|
|||
self.logical_line = ""
|
||||
#: Maximum line length as configured by the user
|
||||
self.max_line_length = options.max_line_length
|
||||
#: Maximum docstring / comment line length as configured by the user
|
||||
self.max_doc_length = options.max_doc_length
|
||||
#: Whether the current physical line is multiline
|
||||
self.multiline = False
|
||||
#: Whether or not we're observing NoQA
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue