summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-12-20 15:33:31 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-12-20 15:42:42 +0100
commit794d7d2866a4dcc45453ab5bb12476c0817ab60c (patch)
tree82d8754ec089b380a9fe62806e4122155d9eda66
parent94ce3fd4743901aeb89743699da74c9307dc0ec1 (diff)
downloadpylint-git-794d7d2866a4dcc45453ab5bb12476c0817ab60c.tar.gz
Fix some typoes before adding typing for checker registering
-rw-r--r--examples/custom.py10
-rw-r--r--pylint/interfaces.py14
-rw-r--r--tests/test_check_parallel.py8
3 files changed, 12 insertions, 20 deletions
diff --git a/examples/custom.py b/examples/custom.py
index bd9797e2a..c7429f629 100644
--- a/examples/custom.py
+++ b/examples/custom.py
@@ -7,7 +7,7 @@ from pylint.interfaces import IAstroidChecker
# This is our checker class.
# Checkers should always inherit from `BaseChecker`.
class MyAstroidChecker(BaseChecker):
- """Add class member attributes to the class locals dictionary."""
+ """Add class member attributes to the class local's dictionary."""
# This class variable defines the type of checker that we are implementing.
# In this case, we are implementing an AST checker.
@@ -31,8 +31,7 @@ class MyAstroidChecker(BaseChecker):
options = (
# Each option definition has a name which is used on the command line
# and in config files, and a dictionary of arguments
- # (similar to those to those to
- # argparse.ArgumentParser.add_argument).
+ # (similar to argparse.ArgumentParser.add_argument).
(
"store-locals-indicator",
{
@@ -48,10 +47,7 @@ class MyAstroidChecker(BaseChecker):
def visit_call(self, node: nodes.Call) -> None:
"""Called when a :class:`.nodes.Call` node is visited.
- See :mod:`astroid` for the description of available nodes.
-
- :param node: The node to check.
- """
+ See :mod:`astroid` for the description of available nodes."""
if not (
isinstance(node.func, nodes.Attribute)
and isinstance(node.func.expr, nodes.Name)
diff --git a/pylint/interfaces.py b/pylint/interfaces.py
index eef47449c..8fd61589f 100644
--- a/pylint/interfaces.py
+++ b/pylint/interfaces.py
@@ -64,9 +64,7 @@ def implements(
obj: "BaseChecker",
interface: Union[Type["Interface"], Tuple[Type["Interface"], ...]],
) -> bool:
- """Return whether the given object (maybe an instance or class) implements
- the interface.
- """
+ """Does the given object (maybe an instance or class) implements the interface."""
kimplements = getattr(obj, "__implements__", ())
if not isinstance(kimplements, (list, tuple)):
kimplements = (kimplements,)
@@ -74,9 +72,7 @@ def implements(
class IChecker(Interface):
- """This is a base interface, not designed to be used elsewhere than for
- sub interfaces definition.
- """
+ """Base interface, not to be used elsewhere than for sub interfaces definition."""
def open(self):
"""called before visiting project (i.e. set of modules)"""
@@ -86,12 +82,12 @@ class IChecker(Interface):
class IRawChecker(IChecker):
- """interface for checker which need to parse the raw file"""
+ """Interface for checker which need to parse the raw file"""
def process_module(self, node: nodes.Module) -> None:
"""process a module
- the module's content is accessible via ``astroid.stream``
+ The module's content is accessible via ``astroid.stream``
"""
@@ -101,7 +97,7 @@ class ITokenChecker(IChecker):
def process_tokens(self, tokens):
"""Process a module.
- tokens is a list of all source code tokens in the file.
+ Tokens is a list of all source code tokens in the file.
"""
diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py
index d1b5a6489..01fc352dc 100644
--- a/tests/test_check_parallel.py
+++ b/tests/test_check_parallel.py
@@ -82,7 +82,7 @@ class ParallelTestChecker(BaseChecker, MapReduceMixin):
On non-parallel builds: it works on all the files in a single run.
- On parallel builds: lint.parallel calls ``open`` once per file.
+ On parallel builds: ``lint.parallel`` calls ``open`` once per file.
So if files are treated by separate processes, no messages will be
raised from the individual process, all messages will be raised
@@ -274,7 +274,7 @@ class TestCheckParallel:
"""Tests original basic types of checker works as expected in -jN
This means that a sequential checker should return the same data for a given
- file-stream irrespective of whether its run in -j1 or -jN
+ file-stream irrespective of whether it's run in -j1 or -jN
"""
linter = PyLinter(reporter=Reporter())
@@ -443,7 +443,7 @@ class TestCheckParallel:
file_infos = _gen_file_datas(num_files)
- # Loop for single-proc and mult-proc so we can ensure the same linter-config
+ # Loop for single-proc and mult-proc, so we can ensure the same linter-config
for do_single_proc in range(2):
linter = PyLinter(reporter=Reporter())
@@ -515,7 +515,7 @@ class TestCheckParallel:
# with the number of files.
file_infos = _gen_file_datas(num_files)
- # Loop for single-proc and mult-proc so we can ensure the same linter-config
+ # Loop for single-proc and mult-proc, so we can ensure the same linter-config
for do_single_proc in range(2):
linter = PyLinter(reporter=Reporter())