summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-04-26 11:27:24 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2022-04-26 14:39:03 +0200
commitd77adce819e1ecf5b965ced1e8a7454d2138e647 (patch)
tree9d1cb2462de1810c84f1beb1f06331e240c3dc67
parent5d1519bd27e9d7936f962b4ed148e8835e639364 (diff)
downloadpylint-git-d77adce819e1ecf5b965ced1e8a7454d2138e647.tar.gz
Remove some words from custom dictionary and update spelling
-rw-r--r--.pyenchant_pylint_custom_dict.txt22
-rw-r--r--pylint/checkers/base/basic_checker.py2
-rw-r--r--pylint/checkers/base/name_checker/naming_style.py2
-rw-r--r--pylint/checkers/format.py6
-rw-r--r--pylint/checkers/mapreduce_checker.py4
-rw-r--r--pylint/checkers/misc.py2
-rw-r--r--pylint/checkers/refactoring/refactoring_checker.py2
-rw-r--r--pylint/checkers/similar.py8
-rw-r--r--pylint/checkers/spelling.py4
-rw-r--r--pylint/checkers/strings.py2
-rw-r--r--pylint/checkers/typecheck.py2
-rw-r--r--pylint/config/exceptions.py2
-rw-r--r--pylint/config/utils.py2
-rwxr-xr-xpylint/epylint.py2
-rw-r--r--pylint/extensions/docparams.py2
-rw-r--r--pylint/extensions/redefined_variable_type.py2
-rw-r--r--pylint/graph.py2
-rw-r--r--pylint/lint/pylinter.py2
-rw-r--r--pylint/lint/run.py2
-rw-r--r--pylint/pyreverse/inspector.py2
-rw-r--r--pylint/testutils/decorator.py2
-rw-r--r--pylint/testutils/functional/find_functional_tests.py4
-rw-r--r--tests/checkers/unittest_spelling.py2
-rw-r--r--tests/lint/unittest_lint.py2
-rw-r--r--tests/test_check_parallel.py6
-rw-r--r--tests/test_self.py2
26 files changed, 35 insertions, 57 deletions
diff --git a/.pyenchant_pylint_custom_dict.txt b/.pyenchant_pylint_custom_dict.txt
index 6d43dc23a..9645d3b3a 100644
--- a/.pyenchant_pylint_custom_dict.txt
+++ b/.pyenchant_pylint_custom_dict.txt
@@ -21,9 +21,6 @@ async
asynccontextmanager
attr
attrib
-autogenerated
-backend
-backticks
BaseChecker
basename
behaviour
@@ -38,7 +35,6 @@ builtins
bw
callables
cardinality
-cartesian
cd
cfg
changelog
@@ -63,7 +59,6 @@ const
Const
contextlib
contextmanager
-counterintuitive
cpython
CPython
csv
@@ -128,7 +123,6 @@ graphname
graphviz
guido's
gv
-hardcoded
hashable
hmac
html
@@ -144,7 +138,6 @@ INI
init
initializer
inlinevar
-instantiated
instantiation
isdir
isfile
@@ -184,7 +177,6 @@ mapreduce
maxsize
maxsplit
mcs
-mergeable
mermaidjs
metaclass
metaclasses
@@ -201,7 +193,6 @@ msgs
msg-template
mult
multiline
-multiprocess
multiset
multisets
myattr
@@ -222,7 +213,6 @@ nonlocals
num
numpy
ok
-onwards
optdict
optik
optiondict
@@ -233,22 +223,16 @@ orelse
os
outputfile
overridable
-parametrize
-parametrized
params
paren
parens
passthru
png
-postprocessed
-postprocessing
pragma
pragma's
pragmas
pre
preorder
-preprocess
-preprocessing
proc
py
pyenchant
@@ -269,7 +253,6 @@ recognise
recurse
recurses
redef
-redefinitions
reportid
rgx
rheaders
@@ -283,7 +266,6 @@ runtime
se
sep
setcomp
-shortcircuiting
shortstrings
singledispatch
spammy
@@ -300,8 +282,6 @@ str
stringified
subclasses
subdicts
-subdirectories
-subdirectory
subgraphs
sublists
subparts
@@ -360,8 +340,6 @@ vcg's
vectorisation
virtualized
wc
-whitespace
-whitespaces
xfails
xml
xyz
diff --git a/pylint/checkers/base/basic_checker.py b/pylint/checkers/base/basic_checker.py
index 54af4590d..0da808614 100644
--- a/pylint/checkers/base/basic_checker.py
+++ b/pylint/checkers/base/basic_checker.py
@@ -730,7 +730,7 @@ class BasicChecker(_BasicChecker):
if isinstance(argument, (nodes.List, nodes.Tuple)):
return
- # dicts are reversible, but only from Python 3.8 onwards. Prior to
+ # dicts are reversible, but only from Python 3.8 onward. Prior to
# that, any class based on dict must explicitly provide a
# __reversed__ method
if not self._py38_plus and isinstance(argument, astroid.Instance):
diff --git a/pylint/checkers/base/name_checker/naming_style.py b/pylint/checkers/base/name_checker/naming_style.py
index cf20169ec..7a469bee8 100644
--- a/pylint/checkers/base/name_checker/naming_style.py
+++ b/pylint/checkers/base/name_checker/naming_style.py
@@ -11,7 +11,7 @@ from pylint import constants
class NamingStyle:
- """It may seem counterintuitive that single naming style has multiple "accepted"
+ """It may seem counter-intuitive that single naming style has multiple "accepted"
forms of regular expressions, but we need to special-case stuff like dunder names in method names.
"""
diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py
index 9ff5f5ebe..187c90655 100644
--- a/pylint/checkers/format.py
+++ b/pylint/checkers/format.py
@@ -422,7 +422,7 @@ class FormatChecker(BaseTokenChecker, BaseRawFileChecker):
elif tok_type not in (tokenize.COMMENT, tokenize.ENCODING):
# This is the first concrete token following a NEWLINE, so it
# must be the first token of the next program statement, or an
- # ENDMARKER; the "line" argument exposes the leading whitespace
+ # ENDMARKER; the "line" argument exposes the leading white-space
# for this statement; in the case of ENDMARKER, line is an empty
# string, so will properly match the empty string with which the
# "indents" stack was seeded
@@ -564,7 +564,7 @@ class FormatChecker(BaseTokenChecker, BaseRawFileChecker):
self._visited_lines[line] = 2
def check_line_ending(self, line: str, i: int) -> None:
- """Check that the final newline is not missing and that there is no trailing whitespace."""
+ """Check that the final newline is not missing and that there is no trailing white-space."""
if not line.endswith("\n"):
self.add_message("missing-final-newline", line=i)
return
@@ -636,7 +636,7 @@ class FormatChecker(BaseTokenChecker, BaseRawFileChecker):
Check lines have :
- a final newline
- - no trailing whitespace
+ - no trailing white-space
- less than a maximum number of characters
"""
# we're first going to do a rough check whether any lines in this set
diff --git a/pylint/checkers/mapreduce_checker.py b/pylint/checkers/mapreduce_checker.py
index 3b88a8be0..9d721aa49 100644
--- a/pylint/checkers/mapreduce_checker.py
+++ b/pylint/checkers/mapreduce_checker.py
@@ -13,7 +13,7 @@ if TYPE_CHECKING:
class MapReduceMixin(metaclass=abc.ABCMeta):
- """A mixin design to allow multiprocess/threaded runs of a Checker."""
+ """A mixin design to allow multi-process/threaded runs of a Checker."""
def __init__(self) -> None:
warnings.warn(
@@ -24,7 +24,7 @@ class MapReduceMixin(metaclass=abc.ABCMeta):
@abc.abstractmethod
def get_map_data(self) -> Any:
- """Returns mergeable/reducible data that will be examined."""
+ """Returns merge-able/reducible data that will be examined."""
@abc.abstractmethod
def reduce_map_data(self, linter: PyLinter, data: list[Any]) -> None:
diff --git a/pylint/checkers/misc.py b/pylint/checkers/misc.py
index ce800c0d2..5eefd618d 100644
--- a/pylint/checkers/misc.py
+++ b/pylint/checkers/misc.py
@@ -138,7 +138,7 @@ class EncodingChecker(BaseTokenChecker, BaseRawFileChecker):
token_info for token_info in tokens if token_info.type == tokenize.COMMENT
)
for comment in comments:
- comment_text = comment.string[1:].lstrip() # trim '#' and whitespaces
+ comment_text = comment.string[1:].lstrip() # trim '#' and white-spaces
# handle pylint disable clauses
disable_option_match = OPTION_PO.search(comment_text)
diff --git a/pylint/checkers/refactoring/refactoring_checker.py b/pylint/checkers/refactoring/refactoring_checker.py
index e85538a7e..b395125b8 100644
--- a/pylint/checkers/refactoring/refactoring_checker.py
+++ b/pylint/checkers/refactoring/refactoring_checker.py
@@ -1296,7 +1296,7 @@ class RefactoringChecker(checkers.BaseTokenChecker):
@staticmethod
def _apply_boolean_simplification_rules(operator, values):
- """Removes irrelevant values or returns shortcircuiting values.
+ """Removes irrelevant values or returns short-circuiting values.
This function applies the following two rules:
1) an OR expression with True in it will always be true, and the
diff --git a/pylint/checkers/similar.py b/pylint/checkers/similar.py
index 3b7d5275e..b2b9e72b5 100644
--- a/pylint/checkers/similar.py
+++ b/pylint/checkers/similar.py
@@ -11,10 +11,10 @@ Then each index of the stripped lines collection is associated with the hash of
(n is the minimum common lines option).
The common hashes between both linesets are then looked for. If there are matches, then the match indices in both linesets are stored and associated
with the corresponding couples (start line number/end line number) in both files.
-This association is then postprocessed to handle the case of successive matches. For example if the minimum common lines setting is set to four, then
+This association is then post-processed to handle the case of successive matches. For example if the minimum common lines setting is set to four, then
the hashes are computed with four lines. If one of match indices couple (12, 34) is the successor of another one (11, 33) then it means that there are
in fact five lines which are common.
-Once postprocessed the values of association table are the result looked for, i.e start and end lines numbers of common lines in both files.
+Once post-processed the values of association table are the result looked for, i.e start and end lines numbers of common lines in both files.
"""
from __future__ import annotations
@@ -531,7 +531,7 @@ class Similar:
yield com
def _iter_sims(self) -> Generator[Commonality, None, None]:
- """Iterate on similarities among all files, by making a cartesian
+ """Iterate on similarities among all files, by making a Cartesian
product
"""
for idx, lineset in enumerate(self.linesets[:-1]):
@@ -562,7 +562,7 @@ def stripped_lines(
ignore_signatures: bool,
line_enabled_callback: Callable[[str, int], bool] | None = None,
) -> list[LineSpecifs]:
- """Return tuples of line/line number/line type with leading/trailing whitespace and any ignored code features removed.
+ """Return tuples of line/line number/line type with leading/trailing white-space and any ignored code features removed.
:param lines: a collection of lines
:param ignore_comments: if true, any comment in the lines collection is removed from the result
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py
index 31c3132fb..593ccf12c 100644
--- a/pylint/checkers/spelling.py
+++ b/pylint/checkers/spelling.py
@@ -165,9 +165,9 @@ CODE_FLANKED_IN_BACKTICK_REGEX = re.compile(r"(\s|^)(`{1,2})([^`]+)(\2)([^`]|$)"
def _strip_code_flanked_in_backticks(line: str) -> str:
- """Alter line so code flanked in backticks is ignored.
+ """Alter line so code flanked in back-ticks is ignored.
- Pyenchant automatically strips backticks when parsing tokens,
+ Pyenchant automatically strips back-ticks when parsing tokens,
so this cannot be done at the individual filter level.
"""
diff --git a/pylint/checkers/strings.py b/pylint/checkers/strings.py
index e8eaf136a..082ea3014 100644
--- a/pylint/checkers/strings.py
+++ b/pylint/checkers/strings.py
@@ -442,7 +442,7 @@ class StringFormatChecker(BaseChecker):
# Skip format nodes which don't have an explicit string on the
# left side of the format operation.
# We do this because our inference engine can't properly handle
- # redefinitions of the original string.
+ # redefinition of the original string.
# Note that there may not be any left side at all, if the format method
# has been assigned to another variable. See issue 351. For example:
#
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index 57d947c53..15eb1fa72 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -1419,7 +1419,7 @@ accessed. Python regular expressions are accepted.",
if parameters[i][1]:
# Duplicate definition of function parameter.
- # Might be too hardcoded, but this can actually
+ # Might be too hard-coded, but this can actually
# happen when using str.format and `self` is passed
# by keyword argument, as in `.format(self=self)`.
# It's perfectly valid to so, so we're just skipping
diff --git a/pylint/config/exceptions.py b/pylint/config/exceptions.py
index 886dc19dc..74a001c24 100644
--- a/pylint/config/exceptions.py
+++ b/pylint/config/exceptions.py
@@ -20,4 +20,4 @@ class _UnrecognizedOptionError(Exception):
class ArgumentPreprocessingError(Exception):
- """Raised if an error occurs during argument preprocessing."""
+ """Raised if an error occurs during argument pre-processing."""
diff --git a/pylint/config/utils.py b/pylint/config/utils.py
index 8c10eb62a..1fa940165 100644
--- a/pylint/config/utils.py
+++ b/pylint/config/utils.py
@@ -214,7 +214,7 @@ PREPROCESSABLE_OPTIONS: dict[
def _preprocess_options(run: Run, args: Sequence[str]) -> list[str]:
- """Preprocess options before full config parsing has started."""
+ """Pre-process options before full config parsing has started."""
processed_args: list[str] = []
i = 0
diff --git a/pylint/epylint.py b/pylint/epylint.py
index 049ab01a5..8f2de33b4 100755
--- a/pylint/epylint.py
+++ b/pylint/epylint.py
@@ -182,7 +182,7 @@ def py_run(
stdout = PIPE if return_std else sys.stdout
if stderr is None:
stderr = PIPE if return_std else sys.stderr
- # Call pylint in a subprocess
+ # Call pylint in a sub-process
with Popen(
cli,
shell=False,
diff --git a/pylint/extensions/docparams.py b/pylint/extensions/docparams.py
index 04131a876..ba2a21d30 100644
--- a/pylint/extensions/docparams.py
+++ b/pylint/extensions/docparams.py
@@ -491,7 +491,7 @@ class DocstringParameterChecker(BaseChecker):
* Parameters mentioned in the parameter documentation that don't or no
longer exist in the function parameter list are noticed.
* If the text "For the parameters, see" or "For the other parameters,
- see" (ignoring additional whitespace) is mentioned in the docstring,
+ see" (ignoring additional white-space) is mentioned in the docstring,
missing parameter documentation is tolerated.
* If there's no Sphinx style, Google style or NumPy style parameter
documentation at all, i.e. ``:param`` is never mentioned etc., the
diff --git a/pylint/extensions/redefined_variable_type.py b/pylint/extensions/redefined_variable_type.py
index 447986eae..994d42278 100644
--- a/pylint/extensions/redefined_variable_type.py
+++ b/pylint/extensions/redefined_variable_type.py
@@ -16,7 +16,7 @@ if TYPE_CHECKING:
class MultipleTypesChecker(BaseChecker):
- """Checks for variable type redefinitions (NoneType excepted).
+ """Checks for variable type redefinition (NoneType excepted).
At a function, method, class or module scope
diff --git a/pylint/graph.py b/pylint/graph.py
index db4827977..3c8af5bb6 100644
--- a/pylint/graph.py
+++ b/pylint/graph.py
@@ -28,7 +28,7 @@ def target_info_from_filename(filename: str) -> tuple[str, str, str]:
class DotBackend:
- """Dot File backend."""
+ """Dot File back-end."""
def __init__(
self,
diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py
index 50f354657..a730fdb35 100644
--- a/pylint/lint/pylinter.py
+++ b/pylint/lint/pylinter.py
@@ -674,7 +674,7 @@ class PyLinter(
@staticmethod
def _discover_files(files_or_modules: Sequence[str]) -> Iterator[str]:
- """Discover python modules and packages in subdirectory.
+ """Discover python modules and packages in sub-directory.
Returns iterator of paths to discovered modules and packages.
"""
diff --git a/pylint/lint/run.py b/pylint/lint/run.py
index 97fe296d9..778e64441 100644
--- a/pylint/lint/run.py
+++ b/pylint/lint/run.py
@@ -106,7 +106,7 @@ group are mutually exclusive.",
self._plugins: list[str] = []
self.verbose: bool = False
- # Preprocess certain options and remove them from args list
+ # Pre-process certain options and remove them from args list
try:
args = _preprocess_options(self, args)
except ArgumentPreprocessingError as ex:
diff --git a/pylint/pyreverse/inspector.py b/pylint/pyreverse/inspector.py
index 91d2199f2..56d7599cd 100644
--- a/pylint/pyreverse/inspector.py
+++ b/pylint/pyreverse/inspector.py
@@ -2,7 +2,7 @@
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
-"""Visitor doing some postprocessing on the astroid tree.
+"""Visitor doing some post-processing on the astroid tree.
Try to resolve definitions (namespace) dictionary, relationship...
"""
diff --git a/pylint/testutils/decorator.py b/pylint/testutils/decorator.py
index 3042dbbe4..ab99cbdd8 100644
--- a/pylint/testutils/decorator.py
+++ b/pylint/testutils/decorator.py
@@ -15,7 +15,7 @@ def set_config(**kwargs: Any) -> Callable[[Callable[..., None]], Callable[..., N
"""Decorator for setting an option on the linter.
Passing the args and kwargs back to the test function itself
- allows this decorator to be used on parametrized test cases.
+ allows this decorator to be used on parameterized test cases.
"""
def _wrapper(fun: Callable[..., None]) -> Callable[..., None]:
diff --git a/pylint/testutils/functional/find_functional_tests.py b/pylint/testutils/functional/find_functional_tests.py
index eddd040c7..7b86ee642 100644
--- a/pylint/testutils/functional/find_functional_tests.py
+++ b/pylint/testutils/functional/find_functional_tests.py
@@ -56,7 +56,7 @@ def _check_functional_tests_structure(directory: Path) -> None:
files: set[Path] = set()
dirs: set[Path] = set()
- # Collect all subdirectories and files in directory
+ # Collect all sub-directories and files in directory
for file_or_dir in directory.iterdir():
if file_or_dir.is_file():
if file_or_dir.suffix == ".py" and not file_or_dir.stem.startswith("_"):
@@ -76,7 +76,7 @@ def _check_functional_tests_structure(directory: Path) -> None:
# Exclude some directories as they follow a different structure
if (
- not len(file.parent.stem) == 1 # First letter subdirectories
+ not len(file.parent.stem) == 1 # First letter sub-directories
and file.parent.stem not in IGNORED_PARENT_DIRS
and file.parent.parent.stem not in IGNORED_PARENT_PARENT_DIRS
):
diff --git a/tests/checkers/unittest_spelling.py b/tests/checkers/unittest_spelling.py
index 3d4553913..9939ccb35 100644
--- a/tests/checkers/unittest_spelling.py
+++ b/tests/checkers/unittest_spelling.py
@@ -316,7 +316,7 @@ class TestSpellingChecker(CheckerTestCase): # pylint:disable=too-many-public-me
def test_skip_tool_directives_at_beginning_of_comments_but_still_raise_error_if_directive_appears_later_in_comment( # pylint:disable=unused-argument
# Having the extra description parameter allows the description
# to show up in the pytest output as part of the test name
- # when running parametrized tests.
+ # when running parameterized tests.
self,
misspelled_portion_of_directive,
second_portion_of_directive,
diff --git a/tests/lint/unittest_lint.py b/tests/lint/unittest_lint.py
index 0fb17062e..78b89974c 100644
--- a/tests/lint/unittest_lint.py
+++ b/tests/lint/unittest_lint.py
@@ -588,7 +588,7 @@ def test_full_documentation(linter: PyLinter) -> None:
output = out.getvalue()
# A few spot checks only
for re_str in (
- # autogenerated text
+ # auto-generated text
"^Pylint global options and switches$",
"Verbatim name of the checker is ``variables``",
# messages
diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py
index d531bcb29..67add930c 100644
--- a/tests/test_check_parallel.py
+++ b/tests/test_check_parallel.py
@@ -294,7 +294,7 @@ class TestCheckParallel:
# register test checkers, but it will trigger at least a single-job to be run.
single_file_container = _gen_file_datas(count=1)
- # Invoke the lint process in a multiprocess way, although we only specify one
+ # Invoke the lint process in a multi-process way, although we only specify one
# job.
check_parallel(
linter,
@@ -363,7 +363,7 @@ class TestCheckParallel:
# register test checkers, but it will trigger at least a single-job to be run.
single_file_container = _gen_file_datas(count=1)
- # Invoke the lint process in a multiprocess way, although we only specify one
+ # Invoke the lint process in a multi-process way, although we only specify one
# job.
check_parallel(
linter, jobs=1, files=iter(single_file_container), arguments=None
@@ -418,7 +418,7 @@ class TestCheckParallel:
without ordering issues, irrespective of the number of workers used and the
number of checkers applied.
- This test becomes more important if we want to change how we parametrize the
+ This test becomes more important if we want to change how we parameterize the
checkers, for example if we aim to batch the files across jobs.
"""
diff --git a/tests/test_self.py b/tests/test_self.py
index a77b5d49c..5e8a40c2d 100644
--- a/tests/test_self.py
+++ b/tests/test_self.py
@@ -557,7 +557,7 @@ class TestRunTC:
a.join("c.py").write(c_code)
with tmpdir.as_cwd():
- # why don't we start pylint in a subprocess?
+ # why don't we start pylint in a sub-process?
expected = (
"************* Module a.b\n"
"a/b.py:3:0: E0401: Unable to import 'a.d' (import-error)\n\n"