summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2021-09-17 07:15:09 +0300
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-09-17 07:39:52 +0200
commit4cb8ef1a89aec4fefb1a36fd484fa9f35be18f03 (patch)
tree223d33e15f4923f708f887a70acdadc991b4c7d4
parentda36529a6ae1fb83417e600528692530a27aac1f (diff)
downloadpylint-git-4cb8ef1a89aec4fefb1a36fd484fa9f35be18f03.tar.gz
Spelling and grammar fixes
-rw-r--r--.github/ISSUE_TEMPLATE/BUG-REPORT.yml2
-rw-r--r--ChangeLog4
-rw-r--r--doc/how_tos/custom_checkers.rst2
-rw-r--r--doc/whatsnew/1.7.rst4
-rw-r--r--doc/whatsnew/2.2.rst2
-rw-r--r--pylint/checkers/base.py2
-rw-r--r--pylint/checkers/classes.py14
-rw-r--r--pylint/checkers/format.py2
-rw-r--r--pylint/checkers/refactoring/refactoring_checker.py4
-rw-r--r--pylint/checkers/similar.py4
-rw-r--r--pylint/checkers/typecheck.py2
-rw-r--r--pylint/checkers/variables.py4
-rw-r--r--pylint/extensions/code_style.py2
-rw-r--r--pylint/extensions/consider_ternary_expression.py2
-rw-r--r--pylint/extensions/mccabe.py2
-rw-r--r--pylint/extensions/typing.py2
-rw-r--r--pylint/utils/pragma_parser.py2
-rw-r--r--tests/benchmark/test_baseline_benchmarks.py4
-rw-r--r--tests/extensions/data/broad_try_clause.py2
-rw-r--r--tests/extensions/test_check_docs.py4
-rw-r--r--tests/functional/a/abstract/abstract_method.py2
-rw-r--r--tests/functional/a/access/access_member_before_definition.py2
-rw-r--r--tests/functional/a/arguments.py2
-rw-r--r--tests/functional/a/arguments_out_of_order.py2
-rw-r--r--tests/functional/b/bad_reversed_sequence.py2
-rw-r--r--tests/functional/c/classes_meth_could_be_a_function.py2
-rw-r--r--tests/functional/c/continue_in_finally.py2
-rw-r--r--tests/functional/d/deprecated/dataclass_typecheck.py2
-rw-r--r--tests/functional/ext/code_style/code_style_consider_using_assignment_expr.py2
-rw-r--r--tests/functional/i/invalid/s/invalid_sequence_index.py2
-rw-r--r--tests/functional/l/long_utf8_lines.py4
-rw-r--r--tests/functional/n/no/no_member_if_statements.py4
-rw-r--r--tests/functional/n/non/non_iterator_returned.py2
-rw-r--r--tests/functional/p/pattern_matching.py2
-rw-r--r--tests/functional/r/return_outside_function.py2
-rw-r--r--tests/functional/s/string/string_formatting.py4
-rw-r--r--tests/functional/u/undefined/undefined_variable.py2
-rw-r--r--tests/functional/u/useless/useless_else_on_loop.py2
-rw-r--r--tests/functional/y/yield_from_outside_func.py2
-rw-r--r--tests/functional/y/yield_outside_func.py2
-rw-r--r--tests/input/func_w0801.py2
-rw-r--r--tests/input/w0801_same.py2
-rw-r--r--tests/lint/unittest_lint.py2
-rw-r--r--tests/pyreverse/test_diadefs.py2
-rw-r--r--tests/test_self.py2
45 files changed, 61 insertions, 61 deletions
diff --git a/.github/ISSUE_TEMPLATE/BUG-REPORT.yml b/.github/ISSUE_TEMPLATE/BUG-REPORT.yml
index 93386964b..36ec13b77 100644
--- a/.github/ISSUE_TEMPLATE/BUG-REPORT.yml
+++ b/.github/ISSUE_TEMPLATE/BUG-REPORT.yml
@@ -42,7 +42,7 @@ body:
[MESSAGE CONTROL]
enable=
- useless-supression
+ useless-suppression
# ...
render: ini
diff --git a/ChangeLog b/ChangeLog
index c730dc5b0..f040dd996 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -337,7 +337,7 @@ Release date: 2021-07-21
Closes #4732
-* Fix a crash when a AttributeInferenceError was not handled properly when
+* Fix a crash when an AttributeInferenceError was not handled properly when
failing to infer the real name of an import in astroid.
Closes #4692
@@ -2175,7 +2175,7 @@ Release date: 2018-11-25
* Allow ``__module__`` to be redefined at a class level. Close #2451
- * ``pylint`` used to emit a ``unused-variable`` error if unused import was found in the function. Now instead of
+ * ``pylint`` used to emit an ``unused-variable`` error if unused import was found in the function. Now instead of
``unused-variable``, ``unused-import`` is emitted.
Close #2421
diff --git a/doc/how_tos/custom_checkers.rst b/doc/how_tos/custom_checkers.rst
index c5deddd94..7a454c4f5 100644
--- a/doc/how_tos/custom_checkers.rst
+++ b/doc/how_tos/custom_checkers.rst
@@ -140,7 +140,7 @@ and to remove the list of return nodes when we leave the function.
Finally we'll implement the check.
We will define a ``visit_return`` function,
-which is called with a :class:`.astroid.nodes.Return` node.
+which is called with an :class:`.astroid.nodes.Return` node.
.. _astroid_extract_node:
.. TODO We can shorten/remove this bit once astroid has API docs.
diff --git a/doc/whatsnew/1.7.rst b/doc/whatsnew/1.7.rst
index 0690ab9e5..0f799e6af 100644
--- a/doc/whatsnew/1.7.rst
+++ b/doc/whatsnew/1.7.rst
@@ -531,7 +531,7 @@ New checkers
* A new refactoring check was added, ``trailing-comma-tuple``, which is emitted
when pylint finds an one-element tuple, created by a stray comma. This can
- suggest a potential problem in the code and it is recommended to use parantheses
+ suggest a potential problem in the code and it is recommended to use parentheses
in order to emphasise the creation of a tuple, rather than relying on the comma
itself.
@@ -541,7 +541,7 @@ New checkers
a = 1,
- The warning can be fixed by adding parantheses:
+ The warning can be fixed by adding parentheses:
.. code-block:: python
diff --git a/doc/whatsnew/2.2.rst b/doc/whatsnew/2.2.rst
index 4a7478ffb..ffa0c92cd 100644
--- a/doc/whatsnew/2.2.rst
+++ b/doc/whatsnew/2.2.rst
@@ -60,7 +60,7 @@ Other Changes
Close #996
-* ``pylint`` used to emit a ``unused-variable`` error if unused import was found in the function. Now instead of
+* ``pylint`` used to emit an ``unused-variable`` error if unused import was found in the function. Now instead of
``unused-variable``, ``unused-import`` is emitted.
Close #2421
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py
index 776d5e520..68f6bd59d 100644
--- a/pylint/checkers/base.py
+++ b/pylint/checkers/base.py
@@ -1145,7 +1145,7 @@ class BasicChecker(_BasicChecker):
self.add_message("using-constant-test", node=node)
elif isinstance(inferred, const_nodes):
# If the constant node is a FunctionDef or Lambda then
- # it may be a illicit function call due to missing parentheses
+ # it may be an illicit function call due to missing parentheses
call_inferred = None
try:
if isinstance(inferred, nodes.FunctionDef):
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py
index d3faabc00..e6df7214e 100644
--- a/pylint/checkers/classes.py
+++ b/pylint/checkers/classes.py
@@ -174,7 +174,7 @@ def _definition_equivalent_to_call(definition, call):
)
-# Deal with parameters overridding in two methods.
+# Deal with parameters overriding in two methods.
def _positional_parameters(method):
@@ -324,18 +324,18 @@ def _different_parameters(
# Allow positional/keyword variadic in overridden to match against any
# positional/keyword argument in original.
- # Keep any arguments that are found seperately in overridden to satisfy
+ # Keep any arguments that are found separately in overridden to satisfy
# later tests
if overridden.args.vararg:
- overidden_names = [v.name for v in overridden_parameters]
+ overridden_names = [v.name for v in overridden_parameters]
original_parameters = [
- v for v in original_parameters if v.name in overidden_names
+ v for v in original_parameters if v.name in overridden_names
]
if overridden.args.kwarg:
- overidden_names = [v.name for v in overridden.args.kwonlyargs]
+ overridden_names = [v.name for v in overridden.args.kwonlyargs]
original_kwonlyargs = [
- v for v in original.args.kwonlyargs if v.name in overidden_names
+ v for v in original.args.kwonlyargs if v.name in overridden_names
]
different_positional = _has_different_parameters(
@@ -1594,7 +1594,7 @@ a metaclass class method.",
# through the class object or through super
callee = node.expr.as_string()
- # Typing annotations in funciton definitions can include protected members
+ # Typing annotations in function definitions can include protected members
if utils.is_node_in_type_annotation_context(node):
return
diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py
index 62064b88b..f79fd6415 100644
--- a/pylint/checkers/format.py
+++ b/pylint/checkers/format.py
@@ -448,7 +448,7 @@ class FormatChecker(BaseTokenChecker):
# without an error.
elif token[1] == "for":
return
- # A generator expression can have a 'else' token in it.
+ # A generator expression can have an 'else' token in it.
# We check the rest of the tokens to see if any problems incure after
# the 'else'.
elif token[1] == "else":
diff --git a/pylint/checkers/refactoring/refactoring_checker.py b/pylint/checkers/refactoring/refactoring_checker.py
index 763c65d46..02b28eb52 100644
--- a/pylint/checkers/refactoring/refactoring_checker.py
+++ b/pylint/checkers/refactoring/refactoring_checker.py
@@ -773,7 +773,7 @@ class RefactoringChecker(checkers.BaseTokenChecker):
self._check_consider_using_min_max_builtin(node)
def _check_consider_using_min_max_builtin(self, node: nodes.If):
- """Check if the given if node can be refactored as an min/max python builtin."""
+ """Check if the given if node can be refactored as a min/max python builtin."""
if self._is_actual_elif(node) or node.orelse:
# Not interested in if statements with multiple branches.
return
@@ -1838,7 +1838,7 @@ class RefactoringChecker(checkers.BaseTokenChecker):
self, node: Union[nodes.For, nodes.Comprehension]
) -> None:
"""Add message when accessing dict values by index lookup."""
- # Verify that we have a .items() call and
+ # Verify that we have an .items() call and
# that the object which is iterated is used as a subscript in the
# body of the for.
# Is it a proper items call?
diff --git a/pylint/checkers/similar.py b/pylint/checkers/similar.py
index 42d407171..9ff5a973b 100644
--- a/pylint/checkers/similar.py
+++ b/pylint/checkers/similar.py
@@ -38,7 +38,7 @@ The common hashes between both linesets are then looked for. If there are matche
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
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 wich are common.
+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.
"""
import copy
@@ -663,7 +663,7 @@ def stripped_lines(
class LineSet:
"""
Holds and indexes all the lines of a single source file.
- Allows for correspondance between real lines of the source file and stripped ones, which
+ Allows for correspondence between real lines of the source file and stripped ones, which
are the real ones from which undesired patterns have been removed.
"""
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index 1245652b1..68883879d 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -420,7 +420,7 @@ MSGS = {
"W1115": (
"Non-string value assigned to __name__",
"non-str-assignment-to-dunder-name",
- "Emitted when a non-string vaue is assigned to __name__",
+ "Emitted when a non-string value is assigned to __name__",
),
"W1116": (
"Second argument of isinstance is not a type",
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index cfaf3b731..6cc2cb865 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -1474,8 +1474,8 @@ class VariablesChecker(BaseChecker):
and defframe.parent_of(node)
and stmt is defstmt
):
- # Single statement if, with assingment expression on same
- # line as assigment
+ # Single statement if, with assignment expression on same
+ # line as assignment
# x = b if (b := True) else False
maybee0601 = False
elif (
diff --git a/pylint/extensions/code_style.py b/pylint/extensions/code_style.py
index 42681d379..aeb185765 100644
--- a/pylint/extensions/code_style.py
+++ b/pylint/extensions/code_style.py
@@ -180,7 +180,7 @@ class CodeStyleChecker(BaseChecker):
def _check_consider_using_assignment_expr(self, node: nodes.If) -> None:
"""Check if an assignment expression (walrus operator) can be used.
- For example if an assignment is directly followed by an if statment:
+ For example if an assignment is directly followed by an if statement:
>>> x = 2
>>> if x:
>>> ...
diff --git a/pylint/extensions/consider_ternary_expression.py b/pylint/extensions/consider_ternary_expression.py
index 976cd20b9..3e3e87c6b 100644
--- a/pylint/extensions/consider_ternary_expression.py
+++ b/pylint/extensions/consider_ternary_expression.py
@@ -15,7 +15,7 @@ class ConsiderTernaryExpressionChecker(BaseChecker):
"Consider rewriting as a ternary expression",
"consider-ternary-expression",
"Multiple assign statements spread across if/else blocks can be "
- "rewritten with a single assingment and ternary expression",
+ "rewritten with a single assignment and ternary expression",
)
}
diff --git a/pylint/extensions/mccabe.py b/pylint/extensions/mccabe.py
index 70ad5a553..f9db6247d 100644
--- a/pylint/extensions/mccabe.py
+++ b/pylint/extensions/mccabe.py
@@ -175,7 +175,7 @@ class McCabeMethodChecker(checkers.BaseChecker):
@check_messages("too-complex")
def visit_module(self, node: nodes.Module) -> None:
"""visit an astroid.Module node to check too complex rating and
- add message if is greather than max_complexity stored from options"""
+ add message if is greater than max_complexity stored from options"""
visitor = PathGraphingAstVisitor()
for child in node.body:
visitor.preorder(child, visitor)
diff --git a/pylint/extensions/typing.py b/pylint/extensions/typing.py
index 90386a8d4..aacd4429a 100644
--- a/pylint/extensions/typing.py
+++ b/pylint/extensions/typing.py
@@ -215,7 +215,7 @@ class TypingChecker(BaseChecker):
self,
node: Union[nodes.Name, nodes.Attribute],
) -> None:
- """Check if typing alias is depecated or could be replaced.
+ """Check if typing alias is deprecated or could be replaced.
Requires
- Python 3.9
diff --git a/pylint/utils/pragma_parser.py b/pylint/utils/pragma_parser.py
index d57d6a1de..cbff8b26a 100644
--- a/pylint/utils/pragma_parser.py
+++ b/pylint/utils/pragma_parser.py
@@ -100,7 +100,7 @@ def parse_pragma(pylint_pragma: str) -> Generator[PragmaRepresenter, None, None]
if kind == "ASSIGN":
if not assignment_required:
if action:
- # A keyword has been found previously but doesn't support assignement
+ # A keyword has been found previously but doesn't support assignment
raise UnRecognizedOptionError(
"The keyword doesn't support assignment", action
)
diff --git a/tests/benchmark/test_baseline_benchmarks.py b/tests/benchmark/test_baseline_benchmarks.py
index f1b9f775d..430e8995c 100644
--- a/tests/benchmark/test_baseline_benchmarks.py
+++ b/tests/benchmark/test_baseline_benchmarks.py
@@ -109,7 +109,7 @@ class NoWorkChecker(BaseChecker):
class TestEstablishBaselineBenchmarks:
"""Naive benchmarks for the high-level pylint framework
- Because this benchmarks the fundemental and common parts and changes seen here will
+ Because this benchmarks the fundamental and common parts and changes seen here will
impact everything else"""
empty_filepath = _empty_filepath()
@@ -249,7 +249,7 @@ class TestEstablishBaselineBenchmarks:
def test_baseline_benchmark_j1_single_working_checker(self, benchmark):
"""Establish a baseline of single-worker performance for PyLinter
- Here we mimick a single Checker that does some work so that we can see the
+ Here we mimic a single Checker that does some work so that we can see the
impact of running a simple system with -j1 against the same system with -j10.
We expect this benchmark to take very close to
diff --git a/tests/extensions/data/broad_try_clause.py b/tests/extensions/data/broad_try_clause.py
index 5649023c6..2bbc4e7a2 100644
--- a/tests/extensions/data/broad_try_clause.py
+++ b/tests/extensions/data/broad_try_clause.py
@@ -12,7 +12,7 @@ except KeyError:
try: # [max-try-statements]
value = MY_DICTIONARY["key_one"]
value += 1
- print("This one has an finally clause only.")
+ print("This one has a finally clause only.")
finally:
pass
diff --git a/tests/extensions/test_check_docs.py b/tests/extensions/test_check_docs.py
index 28f8d935c..ef7ac4928 100644
--- a/tests/extensions/test_check_docs.py
+++ b/tests/extensions/test_check_docs.py
@@ -214,7 +214,7 @@ class TestParamDocChecker(CheckerTestCase):
self.checker.visit_functiondef(node)
def test_func_params_and_keyword_params_in_google_docstring(self) -> None:
- """Example of a function with Google style parameter splitted
+ """Example of a function with Google style parameter split
in Args and Keyword Args in the docstring
"""
node = astroid.extract_node(
@@ -236,7 +236,7 @@ class TestParamDocChecker(CheckerTestCase):
self.checker.visit_functiondef(node)
def test_func_params_and_wrong_keyword_params_in_google_docstring(self) -> None:
- """Example of a function with Google style parameter splitted
+ """Example of a function with Google style parameter split
in Args and Keyword Args in the docstring but with wrong keyword args
"""
node = astroid.extract_node(
diff --git a/tests/functional/a/abstract/abstract_method.py b/tests/functional/a/abstract/abstract_method.py
index d58f68036..be924469d 100644
--- a/tests/functional/a/abstract/abstract_method.py
+++ b/tests/functional/a/abstract/abstract_method.py
@@ -48,7 +48,7 @@ class Concrete(Abstract): # [abstract-method]
"""Concrete class"""
def aaaa(self):
- """overidden form Abstract"""
+ """overridden form Abstract"""
class Structure(object, metaclass=abc.ABCMeta):
diff --git a/tests/functional/a/access/access_member_before_definition.py b/tests/functional/a/access/access_member_before_definition.py
index d8a97b4c7..91389a82a 100644
--- a/tests/functional/a/access/access_member_before_definition.py
+++ b/tests/functional/a/access/access_member_before_definition.py
@@ -23,7 +23,7 @@ class Bbbb(object):
def catchme(self, attr):
- """no AttributeError catched"""
+ """no AttributeError caught"""
try:
return self._repo # [access-member-before-definition]
except ValueError:
diff --git a/tests/functional/a/arguments.py b/tests/functional/a/arguments.py
index 9e66ff18d..df9290345 100644
--- a/tests/functional/a/arguments.py
+++ b/tests/functional/a/arguments.py
@@ -38,7 +38,7 @@ def function_3_args(first_argument, second_argument, third_argument):
return first_argument, second_argument, third_argument
def function_default_arg(one=1, two=2):
- """fonction with default value"""
+ """function with default value"""
return two, one
diff --git a/tests/functional/a/arguments_out_of_order.py b/tests/functional/a/arguments_out_of_order.py
index 600664c94..5538a1dba 100644
--- a/tests/functional/a/arguments_out_of_order.py
+++ b/tests/functional/a/arguments_out_of_order.py
@@ -7,7 +7,7 @@ def function_3_args(first_argument, second_argument, third_argument):
def function_default_arg(one=1, two=2):
- """fonction with default value"""
+ """function with default value"""
return two, one
diff --git a/tests/functional/b/bad_reversed_sequence.py b/tests/functional/b/bad_reversed_sequence.py
index 101123330..2450d960b 100644
--- a/tests/functional/b/bad_reversed_sequence.py
+++ b/tests/functional/b/bad_reversed_sequence.py
@@ -32,7 +32,7 @@ class ThirdBadReversed(dict):
""" dict subclass """
def uninferable(seq):
- """ This can't be infered at this moment,
+ """ This can't be inferred at this moment,
make sure we don't have a false positive.
"""
return reversed(seq)
diff --git a/tests/functional/c/classes_meth_could_be_a_function.py b/tests/functional/c/classes_meth_could_be_a_function.py
index 94103a324..3abda55a0 100644
--- a/tests/functional/c/classes_meth_could_be_a_function.py
+++ b/tests/functional/c/classes_meth_could_be_a_function.py
@@ -2,7 +2,7 @@
"""
#2479
-R0201 (formely W0212), Method could be a function shouldn't be emitted in case
+R0201 (formerly W0212), Method could be a function shouldn't be emitted in case
like factory method pattern
"""
__revision__ = 1
diff --git a/tests/functional/c/continue_in_finally.py b/tests/functional/c/continue_in_finally.py
index bb1fcbab1..dcdac8f8d 100644
--- a/tests/functional/c/continue_in_finally.py
+++ b/tests/functional/c/continue_in_finally.py
@@ -1,4 +1,4 @@
-"""Test that `continue` is catched when met inside a `finally` clause."""
+"""Test that `continue` is caught when met inside a `finally` clause."""
# pylint: disable=missing-docstring, lost-exception, broad-except
diff --git a/tests/functional/d/deprecated/dataclass_typecheck.py b/tests/functional/d/deprecated/dataclass_typecheck.py
index 9a2be2fb8..0de6e43b3 100644
--- a/tests/functional/d/deprecated/dataclass_typecheck.py
+++ b/tests/functional/d/deprecated/dataclass_typecheck.py
@@ -104,7 +104,7 @@ class Test2(metaclass=obj.attr1): # [invalid-metaclass]
{}[obj.attr1] = 1
{}[obj.attr5] = 1 # [unhashable-dict-key]
-for k, v in obj.attr5: # TODO: Should be an dict-iter-missing-items error
+for k, v in obj.attr5: # TODO: Should be a dict-iter-missing-items error
print(k, v)
__name__ = obj.attr0
diff --git a/tests/functional/ext/code_style/code_style_consider_using_assignment_expr.py b/tests/functional/ext/code_style/code_style_consider_using_assignment_expr.py
index 60d3f4d1b..4f9a83700 100644
--- a/tests/functional/ext/code_style/code_style_consider_using_assignment_expr.py
+++ b/tests/functional/ext/code_style/code_style_consider_using_assignment_expr.py
@@ -4,7 +4,7 @@ a1 = 2
if a1: # [consider-using-assignment-expr]
...
-# Do not suggest assignement expressions if assignment spans multiple lines
+# Do not suggest assignment expressions if assignment spans multiple lines
a2 = (
1,
)
diff --git a/tests/functional/i/invalid/s/invalid_sequence_index.py b/tests/functional/i/invalid/s/invalid_sequence_index.py
index d11155c02..36a0fae22 100644
--- a/tests/functional/i/invalid/s/invalid_sequence_index.py
+++ b/tests/functional/i/invalid/s/invalid_sequence_index.py
@@ -129,7 +129,7 @@ def function19():
TESTLIST[0] = 0 # no error
def function20():
- """Delete with None and integer indicies"""
+ """Delete with None and integer indices"""
del TESTLIST[None] # [invalid-sequence-index]
del TESTLIST[0] # no error
diff --git a/tests/functional/l/long_utf8_lines.py b/tests/functional/l/long_utf8_lines.py
index 815759fe5..138e4e299 100644
--- a/tests/functional/l/long_utf8_lines.py
+++ b/tests/functional/l/long_utf8_lines.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-"""this utf-8 doc string have some non ASCII caracters like 'é', or '¢»ß'"""
-### check also comments with some more non ASCII caracters like 'é' or '¢»ß'
+"""this utf-8 doc string have some non ASCII characters like 'é', or '¢»ß'"""
+### check also comments with some more non ASCII characters like 'é' or '¢»ß'
__revision__ = 1100
diff --git a/tests/functional/n/no/no_member_if_statements.py b/tests/functional/n/no/no_member_if_statements.py
index ad87e9950..d26c5c483 100644
--- a/tests/functional/n/no/no_member_if_statements.py
+++ b/tests/functional/n/no/no_member_if_statements.py
@@ -48,9 +48,9 @@ try:
subprocess.check_call(['ls', '-']) # Deliberately made error in this line
except Exception as err:
if isinstance(err, subprocess.CalledProcessError):
- print(f'Subprocess error occured. Return code: {err.returncode}')
+ print(f'Subprocess error occurred. Return code: {err.returncode}')
else:
- print(f'An error occured: {str(err)}')
+ print(f'An error occurred: {str(err)}')
raise
diff --git a/tests/functional/n/non/non_iterator_returned.py b/tests/functional/n/non/non_iterator_returned.py
index 4d0dd2a39..294e6da01 100644
--- a/tests/functional/n/non/non_iterator_returned.py
+++ b/tests/functional/n/non/non_iterator_returned.py
@@ -68,7 +68,7 @@ class FileBasedIterator(object):
if self.file is not None:
self.file.close()
self.file = open(self.path, encoding="utf-8")
- # self file has two infered values: None and <instance of 'file'>
+ # self file has two inferred values: None and <instance of 'file'>
# we don't want to emit error in this case
return self.file
diff --git a/tests/functional/p/pattern_matching.py b/tests/functional/p/pattern_matching.py
index 4b3a71643..4a5884812 100644
--- a/tests/functional/p/pattern_matching.py
+++ b/tests/functional/p/pattern_matching.py
@@ -8,7 +8,7 @@ class Point2D:
self.y = y
-# Don't emit false-positive 'unused-variable' and 'undefined-varibable'
+# Don't emit false-positive 'unused-variable' and 'undefined-variable'
var = 42
match var:
case [*rest1]:
diff --git a/tests/functional/r/return_outside_function.py b/tests/functional/r/return_outside_function.py
index 449dafd68..93ec22e53 100644
--- a/tests/functional/r/return_outside_function.py
+++ b/tests/functional/r/return_outside_function.py
@@ -1,2 +1,2 @@
-"""This is gramatically correct, but it's still a SyntaxError"""
+"""This is grammatically correct, but it's still a SyntaxError"""
return # [return-outside-function]
diff --git a/tests/functional/s/string/string_formatting.py b/tests/functional/s/string/string_formatting.py
index 8372a4373..b72e9f676 100644
--- a/tests/functional/s/string/string_formatting.py
+++ b/tests/functional/s/string/string_formatting.py
@@ -27,7 +27,7 @@ class Getitem(object):
class ReturnYes(object):
- """ can't be properly infered """
+ """ can't be properly inferred """
missing = Missing()
@@ -160,7 +160,7 @@ def issue338():
class Crash(namedtuple("C", "foo bar")):
""" Looking for attributes in __str__ will crash,
- because EmptyNodes can't be infered.
+ because EmptyNodes can't be inferred.
"""
def __str__(self):
return "{0.foo}: {0.bar}".format(self)
diff --git a/tests/functional/u/undefined/undefined_variable.py b/tests/functional/u/undefined/undefined_variable.py
index 0b92a495d..b4e1f8335 100644
--- a/tests/functional/u/undefined/undefined_variable.py
+++ b/tests/functional/u/undefined/undefined_variable.py
@@ -24,7 +24,7 @@ DEFINED[__revision__] = OTHER = 'move this is astroid test'
OTHER += '$'
def bad_default(var, default=unknown2): # [undefined-variable]
- """function with defaut arg's value set to an unexistant name"""
+ """function with default arg's value set to an nonexistent name"""
print(var, default)
print(xxxx) # [undefined-variable]
augvar += 1 # [undefined-variable]
diff --git a/tests/functional/u/useless/useless_else_on_loop.py b/tests/functional/u/useless/useless_else_on_loop.py
index d686f4658..0bd3dff67 100644
--- a/tests/functional/u/useless/useless_else_on_loop.py
+++ b/tests/functional/u/useless/useless_else_on_loop.py
@@ -3,7 +3,7 @@ from __future__ import print_function
__revision__ = 0
def test_return_for():
- """else + return is not accetable."""
+ """else + return is not acceptable."""
for i in range(10):
if i % 2:
return i
diff --git a/tests/functional/y/yield_from_outside_func.py b/tests/functional/y/yield_from_outside_func.py
index e2db90c94..6c539db58 100644
--- a/tests/functional/y/yield_from_outside_func.py
+++ b/tests/functional/y/yield_from_outside_func.py
@@ -1,4 +1,4 @@
-"""This is gramatically correct, but it's still a SyntaxError"""
+"""This is grammatically correct, but it's still a SyntaxError"""
yield from [1, 2] # [yield-outside-function]
LAMBDA_WITH_YIELD = lambda: (yield from [1, 2])
diff --git a/tests/functional/y/yield_outside_func.py b/tests/functional/y/yield_outside_func.py
index 5824bc0c7..726a8e13e 100644
--- a/tests/functional/y/yield_outside_func.py
+++ b/tests/functional/y/yield_outside_func.py
@@ -1,4 +1,4 @@
-"""This is gramatically correct, but it's still a SyntaxError"""
+"""This is grammatically correct, but it's still a SyntaxError"""
yield 1 # [yield-outside-function]
LAMBDA_WITH_YIELD = lambda: (yield)
diff --git a/tests/input/func_w0801.py b/tests/input/func_w0801.py
index cd386ff55..45b57b441 100644
--- a/tests/input/func_w0801.py
+++ b/tests/input/func_w0801.py
@@ -1,5 +1,5 @@
"""test code similarities
-by defaut docstring are not considered
+by default docstring are not considered
"""
__revision__ = 'id'
A = 2
diff --git a/tests/input/w0801_same.py b/tests/input/w0801_same.py
index cd386ff55..45b57b441 100644
--- a/tests/input/w0801_same.py
+++ b/tests/input/w0801_same.py
@@ -1,5 +1,5 @@
"""test code similarities
-by defaut docstring are not considered
+by default docstring are not considered
"""
__revision__ = 'id'
A = 2
diff --git a/tests/lint/unittest_lint.py b/tests/lint/unittest_lint.py
index 53d2cd739..5cb88f043 100644
--- a/tests/lint/unittest_lint.py
+++ b/tests/lint/unittest_lint.py
@@ -824,7 +824,7 @@ def test_filename_with__init__(init_linter: PyLinter) -> None:
def test_by_module_statement_value(init_linter: PyLinter) -> None:
- """Test "statement" for each module analized of computed correctly."""
+ """Test "statement" for each module analyzed of computed correctly."""
linter = init_linter
linter.check([os.path.join(os.path.dirname(__file__), "data")])
diff --git a/tests/pyreverse/test_diadefs.py b/tests/pyreverse/test_diadefs.py
index 0b31a28fe..ec7b48614 100644
--- a/tests/pyreverse/test_diadefs.py
+++ b/tests/pyreverse/test_diadefs.py
@@ -127,7 +127,7 @@ class TestDefaultDiadefGenerator:
) -> None:
"""functional test of relations extraction;
different classes possibly in different modules"""
- # XXX should be catching pyreverse environnement problem but doesn't
+ # XXX should be catching pyreverse environment problem but doesn't
# pyreverse doesn't extracts the relations but this test ok
project = get_project("data")
handler = DiadefsHandler(default_config)
diff --git a/tests/test_self.py b/tests/test_self.py
index 41e7898e8..39b3965d4 100644
--- a/tests/test_self.py
+++ b/tests/test_self.py
@@ -278,7 +278,7 @@ class TestRunTC:
self._runtest([], code=32)
def test_no_out_encoding(self) -> None:
- """test redirection of stdout with non ascii caracters"""
+ """test redirection of stdout with non ascii characters"""
# This test reproduces bug #48066 ; it happens when stdout is redirected
# through '>' : the sys.stdout.encoding becomes then None, and if the
# output contains non ascii, pylint will crash