mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 14:04:16 +00:00
Merge branch 'spelling' into 'master'
fix a few small spelling issues See merge request pycqa/flake8!452
This commit is contained in:
commit
a42d8cbed4
14 changed files with 16 additions and 16 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
In |Flake8| 2.x, |Flake8| delegated check running to pep8. In 3.0 |Flake8|
|
In |Flake8| 2.x, |Flake8| delegated check running to pep8. In 3.0 |Flake8|
|
||||||
takes on that responsibility. This has allowed for simpler
|
takes on that responsibility. This has allowed for simpler
|
||||||
handling of the ``--jobs`` parameter (using :mod:`multiprocessing`) and
|
handling of the ``--jobs`` parameter (using :mod:`multiprocessing`) and
|
||||||
simplified our fallback if something goes awry with concurency.
|
simplified our fallback if something goes awry with concurrency.
|
||||||
At the lowest level we have a |FileChecker|. Instances of |FileChecker| are
|
At the lowest level we have a |FileChecker|. Instances of |FileChecker| are
|
||||||
created for *each* file to be analyzed by |Flake8|. Each instance, has a copy
|
created for *each* file to be analyzed by |Flake8|. Each instance, has a copy
|
||||||
of all of the plugins registered with setuptools in the ``flake8.extension``
|
of all of the plugins registered with setuptools in the ``flake8.extension``
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
While writing |Flake8| 3.0, the developers attempted to capture some reasoning
|
While writing |Flake8| 3.0, the developers attempted to capture some reasoning
|
||||||
and decision information in internal documentation meant for future developers
|
and decision information in internal documentation meant for future developers
|
||||||
and maintaners. Most of this information is unnecessary for users and plugin
|
and maintainers. Most of this information is unnecessary for users and plugin
|
||||||
developers. Some of it, however, is linked to from the plugin development
|
developers. Some of it, however, is linked to from the plugin development
|
||||||
documentation.
|
documentation.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ You can view the `3.7.7 milestone`_ on GitLab for more details.
|
||||||
Bugs Fixed
|
Bugs Fixed
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
- Fix crahes in plugins causing ``flake8`` to hang while unpickling errors (See
|
- Fix crashes in plugins causing ``flake8`` to hang while unpickling errors
|
||||||
also `GitLab!308`_, `GitLab#505`_)
|
(See also `GitLab!308`_, `GitLab#505`_)
|
||||||
|
|
||||||
|
|
||||||
.. all links
|
.. all links
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ You can view the `3.8.2 milestone`_ on GitLab for more details.
|
||||||
Bugs Fixed
|
Bugs Fixed
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
- Improve performance by eliminating unncessary sort (See also `GitLab!429`_)
|
- Improve performance by eliminating unnecessary sort (See also `GitLab!429`_)
|
||||||
|
|
||||||
- Improve messaging of ``--jobs`` argument by utilizing ``argparse`` (See also
|
- Improve messaging of ``--jobs`` argument by utilizing ``argparse`` (See also
|
||||||
`GitLab!428`_, `GitLab#567`_)
|
`GitLab!428`_, `GitLab#567`_)
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ Now let's select all ``E`` class violations:
|
||||||
example.py:4:9: E131 continuation line unaligned for hanging indent
|
example.py:4:9: E131 continuation line unaligned for hanging indent
|
||||||
example.py:5:9: E121 continuation line under-indented for hanging indent
|
example.py:5:9: E121 continuation line under-indented for hanging indent
|
||||||
|
|
||||||
Suddenly we now have far more erors that are reported to us. Using
|
Suddenly we now have far more errors that are reported to us. Using
|
||||||
``--select`` alone will override the default ``--ignore`` list. In these cases,
|
``--select`` alone will override the default ``--ignore`` list. In these cases,
|
||||||
the user is telling us that they want all ``E`` violations and so we ignore
|
the user is telling us that they want all ``E`` violations and so we ignore
|
||||||
our list of violations that we ignore by default.
|
our list of violations that we ignore by default.
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ class Manager(object):
|
||||||
# First we walk through all of our error cases:
|
# First we walk through all of our error cases:
|
||||||
# - multiprocessing library is not present
|
# - multiprocessing library is not present
|
||||||
# - we're running on windows in which case we know we have significant
|
# - we're running on windows in which case we know we have significant
|
||||||
# implemenation issues
|
# implementation issues
|
||||||
# - the user provided stdin and that's not something we can handle
|
# - the user provided stdin and that's not something we can handle
|
||||||
# well
|
# well
|
||||||
# - we're processing a diff, which again does not work well with
|
# - we're processing a diff, which again does not work well with
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ NOQA_INLINE_REGEXP = re.compile(
|
||||||
# We do not want to capture the ``: `` that follows ``noqa``
|
# We do not want to capture the ``: `` that follows ``noqa``
|
||||||
# We do not care about the casing of ``noqa``
|
# We do not care about the casing of ``noqa``
|
||||||
# We want a comma-separated list of errors
|
# We want a comma-separated list of errors
|
||||||
# https://regex101.com/r/4XUuax/2 full explenation of the regex
|
# https://regex101.com/r/4XUuax/2 full explanation of the regex
|
||||||
r"# noqa(?::[\s]?(?P<codes>([A-Z]+[0-9]+(?:[,\s]+)?)+))?",
|
r"# noqa(?::[\s]?(?P<codes>([A-Z]+[0-9]+(?:[,\s]+)?)+))?",
|
||||||
re.IGNORECASE,
|
re.IGNORECASE,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ def hook(ui, repo, **kwargs):
|
||||||
around Hooks: https://www.mercurial-scm.org/wiki/Hook.
|
around Hooks: https://www.mercurial-scm.org/wiki/Hook.
|
||||||
|
|
||||||
We avoid using the ``ui`` attribute because it can cause issues with
|
We avoid using the ``ui`` attribute because it can cause issues with
|
||||||
the GPL license tha Mercurial is under. We don't import it, but we
|
the GPL license that Mercurial is under. We don't import it, but we
|
||||||
avoid using it all the same.
|
avoid using it all the same.
|
||||||
"""
|
"""
|
||||||
from flake8.main import application
|
from flake8.main import application
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ from flake8.main import mercurial
|
||||||
# NOTE(sigmavirus24): In the future, we may allow for VCS hooks to be defined
|
# NOTE(sigmavirus24): In the future, we may allow for VCS hooks to be defined
|
||||||
# as plugins, e.g., adding a flake8.vcs entry-point. In that case, this
|
# as plugins, e.g., adding a flake8.vcs entry-point. In that case, this
|
||||||
# dictionary should disappear, and this module might contain more code for
|
# dictionary should disappear, and this module might contain more code for
|
||||||
# managing those bits (in conjuntion with flake8.plugins.manager).
|
# managing those bits (in conjunction with flake8.plugins.manager).
|
||||||
_INSTALLERS = {"git": git.install, "mercurial": mercurial.install}
|
_INSTALLERS = {"git": git.install, "mercurial": mercurial.install}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class ConfigFileFinder(object):
|
||||||
:param list extra_config_files:
|
:param list extra_config_files:
|
||||||
Extra configuration files specified by the user to read.
|
Extra configuration files specified by the user to read.
|
||||||
:param str config_file:
|
:param str config_file:
|
||||||
Configuration file override to only read configuraiton from.
|
Configuration file override to only read configuration from.
|
||||||
:param bool ignore_config_files:
|
:param bool ignore_config_files:
|
||||||
Determine whether to ignore configuration files or not.
|
Determine whether to ignore configuration files or not.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ class Option(object):
|
||||||
Number of arguments to parse for this option.
|
Number of arguments to parse for this option.
|
||||||
:param const:
|
:param const:
|
||||||
Constant value to store on a common destination. Usually used in
|
Constant value to store on a common destination. Usually used in
|
||||||
conjuntion with ``action="store_const"``.
|
conjunction with ``action="store_const"``.
|
||||||
:param iterable choices:
|
:param iterable choices:
|
||||||
Possible values for the option.
|
Possible values for the option.
|
||||||
:param str help:
|
:param str help:
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ def _tokenize_files_to_codes_mapping(value):
|
||||||
|
|
||||||
def parse_files_to_codes_mapping(value_): # noqa: C901
|
def parse_files_to_codes_mapping(value_): # noqa: C901
|
||||||
# type: (Union[Sequence[str], str]) -> List[Tuple[str, List[str]]]
|
# type: (Union[Sequence[str], str]) -> List[Tuple[str, List[str]]]
|
||||||
"""Parse a files-to-codes maping.
|
"""Parse a files-to-codes mapping.
|
||||||
|
|
||||||
A files-to-codes mapping a sequence of values specified as
|
A files-to-codes mapping a sequence of values specified as
|
||||||
`filenames list:codes list ...`. Each of the lists may be separated by
|
`filenames list:codes list ...`. Each of the lists may be separated by
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ def test_keyword_arguments_for_does_not_handle_attribute_errors(
|
||||||
('line 1\n\nline 2\n', ['line 1', '', 'line 2']),
|
('line 1\n\nline 2\n', ['line 1', '', 'line 2']),
|
||||||
])
|
])
|
||||||
def test_split_line(unsplit_line, expected_lines, default_options):
|
def test_split_line(unsplit_line, expected_lines, default_options):
|
||||||
"""Verify the token line spliting."""
|
"""Verify the token line splitting."""
|
||||||
file_processor = processor.FileProcessor('-', default_options, lines=[
|
file_processor = processor.FileProcessor('-', default_options, lines=[
|
||||||
'Line 1',
|
'Line 1',
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ def test_get_style_guide():
|
||||||
|
|
||||||
|
|
||||||
def test_styleguide_options():
|
def test_styleguide_options():
|
||||||
"""Show tha we proxy the StyleGuide.options attribute."""
|
"""Show that we proxy the StyleGuide.options attribute."""
|
||||||
app = mock.Mock()
|
app = mock.Mock()
|
||||||
app.options = 'options'
|
app.options = 'options'
|
||||||
style_guide = api.StyleGuide(app)
|
style_guide = api.StyleGuide(app)
|
||||||
|
|
@ -50,7 +50,7 @@ def test_styleguide_options():
|
||||||
|
|
||||||
|
|
||||||
def test_styleguide_paths():
|
def test_styleguide_paths():
|
||||||
"""Show tha we proxy the StyleGuide.paths attribute."""
|
"""Show that we proxy the StyleGuide.paths attribute."""
|
||||||
app = mock.Mock()
|
app = mock.Mock()
|
||||||
app.paths = 'paths'
|
app.paths = 'paths'
|
||||||
style_guide = api.StyleGuide(app)
|
style_guide = api.StyleGuide(app)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue