Skip to content

Fix typos #5540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,9 @@ contributors:

* Damien Baty: contributor

* Daniel R. Neal (danrneal): contributer
* Daniel R. Neal (danrneal): contributor

* Jeremy Fleischman (jfly): contributer
* Jeremy Fleischman (jfly): contributor

* Shiv Venkatasubrahmanyam

Expand Down Expand Up @@ -593,3 +593,5 @@ contributors:
- Fixed issue 5452, false positive missing-param-doc for multi-line Google-style params

* Eero Vuojolahti: contributor

* Kian-Meng, Ang: contributor
32 changes: 16 additions & 16 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Release date: TBA

Closes #5504

* The ``PyLinter`` class will now be initialiazed with a ``TextReporter``
* The ``PyLinter`` class will now be initialized with a ``TextReporter``
as its reporter if none is provided.

* Fatal errors now emit a score of 0.0 regardless of whether the linted module
Expand Down Expand Up @@ -207,8 +207,8 @@ Release date: 2021-11-24
output files without these will trigger a ``DeprecationWarning``. Expected output files
can be easily updated with the ``python tests/test_functional.py --update-functional-output`` command.

* The functional ``testutils`` now correctly check the distinction betweeen ``HIGH`` and
``UNDEFINED`` confidence. Expected output files without defiend ``confidence`` levels will now
* The functional ``testutils`` now correctly check the distinction between ``HIGH`` and
``UNDEFINED`` confidence. Expected output files without defined ``confidence`` levels will now
trigger a ``DeprecationWarning``. Expected output files can be easily updated with the
``python tests/test_functional.py --update-functional-output`` command.

Expand Down Expand Up @@ -331,7 +331,7 @@ Release date: 2021-11-24

Closes #5194

* Fix double emitting of ``not-callable`` on inferrable ``properties``
* Fix double emitting of ``not-callable`` on inferable ``properties``

Closes #4426

Expand Down Expand Up @@ -495,7 +495,7 @@ Release date: 2021-09-16
Closes #4776


* Added ``py-version`` config key (if ``[MASTER]`` section). Used for version dependant checks.
* Added ``py-version`` config key (if ``[MASTER]`` section). Used for version dependent checks.
Will default to whatever Python version pylint is executed with.

* ``CodeStyleChecker``
Expand All @@ -514,7 +514,7 @@ Release date: 2021-09-16

Closes #4751

* https is now prefered in the documentation and http://pylint.pycqa.org correctly redirect to https://pylint.pycqa.org
* https is now preferred in the documentation and http://pylint.pycqa.org correctly redirect to https://pylint.pycqa.org

Closes #3802

Expand Down Expand Up @@ -728,7 +728,7 @@ Release date: 2021-08-20
* Fixed bug with ``cell-var-from-loop`` checker: it no longer has false negatives when
both ``unused-variable`` and ``used-before-assignment`` are disabled.

* Fix false postive for ``invalid-all-format`` if the list or tuple builtin functions are used
* Fix false positive for ``invalid-all-format`` if the list or tuple builtin functions are used

Closes #4711

Expand Down Expand Up @@ -1456,7 +1456,7 @@ Release date: 2021-02-21

Close #3862

* Fix linter multiprocessing pool shutdown (triggered warnings when runned in parallels with other pytest plugins)
* Fix linter multiprocessing pool shutdown (triggered warnings when ran in parallels with other pytest plugins)

Closes #3779

Expand All @@ -1483,7 +1483,7 @@ Release date: 2021-02-21

Closes #3468

* Fix ``useless-super-delegation`` false positive when default keyword argument is a dictionnary.
* Fix ``useless-super-delegation`` false positive when default keyword argument is a dictionary.

Close #3773

Expand Down Expand Up @@ -3484,7 +3484,7 @@ Release date: 2017-04-13

This message 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 in order to emphasise 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.

* Don't emit not-callable for instances with unknown bases.
Expand Down Expand Up @@ -4184,7 +4184,7 @@ Release date: 2015-11-29
directory 'test/extensions' and documentation file 'doc/extensions.rst'.

* Added new checker 'extensions.check_docs' that verifies parameter
documention in Sphinx, Google, and Numpy style.
documentation in Sphinx, Google, and Numpy style.

* Detect undefined variable cases, where the "definition" of an undefined
variable was in del statement. Instead of emitting used-before-assignment,
Expand Down Expand Up @@ -4280,7 +4280,7 @@ Release date: 2015-11-29
two a binary arithmetic operation is executed between two objects
which don't support it (a number plus a string for instance).
This is currently disabled, since the it exhibits way too many false
positives, but it will be reenabled as soon as possible.
positives, but it will be re-enabled as soon as possible.

* New imported features from astroid into pyreverse: pyreverse.inspector.Project,
pyreverse.inspector.project_from_files and pyreverse.inspector.interfaces.
Expand Down Expand Up @@ -5255,7 +5255,7 @@ Release date: 2012-10-05

* #105337: allow custom reporter in output-format (patch by Kevin Jing Qiu)

* #104420: check for protocol completness and avoid false R0903
* #104420: check for protocol completeness and avoid false R0903
(patch by Peter Hammond)

* #100654: fix grammatical error for W0332 message (using 'l' as
Expand Down Expand Up @@ -5283,7 +5283,7 @@ Release date: 2012-07-17
except handler contains a tuple of names instead of a single name.
(patch by tmarek@google.com)

* #7394: W0212 (access to protected member) not emitted on assigments
* #7394: W0212 (access to protected member) not emitted on assignments
(patch by lothiraldan@gmail.com)

* #18772; no prototype consistency check for mangled methods (patch by
Expand Down Expand Up @@ -5878,7 +5878,7 @@ Release date: 2006-03-06
- the C0101 check with its min-name-length option has
been removed (this can be specified in the regxp after all...)
- W0103 and W0121 are now handled by the variables checker
(W0103 is now W0603 and W0604 has been splitted into different messages)
(W0103 is now W0603 and W0604 has been split into different messages)
- W0131 and W0132 messages have been reclassified to C0111 and
C0112 respectively
- new W0104 message on statement without effect
Expand Down Expand Up @@ -5915,7 +5915,7 @@ Release date: 2006-01-10
or the default ~/.pylintrc or /etc/pylintrc

* fixed W0706 (Identifier used to raise an exception is assigned...)
false positive and reraising a catched exception instance
false positive and reraising a caught exception instance

* fixed E0611 (No name get in module blabla) false positive when accessing
to a class'__dict__
Expand Down
2 changes: 1 addition & 1 deletion doc/whatsnew/2.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Extensions
Other Changes
=============

* Added ``py-version`` config key (if ``[MASTER]`` section). Used for version dependant checks.
* Added ``py-version`` config key (if ``[MASTER]`` section). Used for version dependent checks.
Will default to whatever Python version pylint is executed with.

* The ``invalid-name`` message is now more detailed when using multiple naming style regexes.
Expand Down
6 changes: 3 additions & 3 deletions doc/whatsnew/2.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ Other Changes
output files without these will trigger a ``DeprecationWarning``. Expected output files
can be easily updated with the ``python tests/test_functional.py --update-functional-output`` command.

* The functional ``testutils`` now correctly check the distinction betweeen ``HIGH`` and
``UNDEFINED`` confidence. Expected output files without defiend ``confidence`` levels will now
* The functional ``testutils`` now correctly check the distinction between ``HIGH`` and
``UNDEFINED`` confidence. Expected output files without defined ``confidence`` levels will now
trigger a ``DeprecationWarning``. Expected output files can be easily updated with the
``python tests/test_functional.py --update-functional-output`` command.

Expand Down Expand Up @@ -179,7 +179,7 @@ Other Changes

Closes #5261

* Fix double emitting of ``not-callable`` on inferrable ``properties``
* Fix double emitting of ``not-callable`` on inferable ``properties``

Closes #4426

Expand Down
2 changes: 1 addition & 1 deletion doc/whatsnew/2.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Summary -- Release highlights

New checkers
============
* ``unnecessary-ellipsis``: Emmitted when the ellipsis constant is used unnecessarily.
* ``unnecessary-ellipsis``: Emitted when the ellipsis constant is used unnecessarily.

Closes #5460

Expand Down
2 changes: 1 addition & 1 deletion doc/whatsnew/2.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Other Changes

* Fix false positive for ``builtin-not-iterating`` when ``zip`` or ``map`` receives iterable

* Fix linter multiprocessing pool shutdown which triggered warnings when runned in parallels with other pytest plugins.
* Fix linter multiprocessing pool shutdown which triggered warnings when ran in parallels with other pytest plugins.

* Enums are now required to be named in UPPER_CASE by ``invalid-name``.

Expand Down
2 changes: 1 addition & 1 deletion examples/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ confidence=
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
Expand Down
2 changes: 1 addition & 1 deletion pylint/checkers/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def _check_keyword_parentheses(
elif token[1] == "for":
return
# A generator expression can have an 'else' token in it.
# We check the rest of the tokens to see if any problems incure after
# We check the rest of the tokens to see if any problems incur after
# the 'else'.
elif token[1] == "else":
if "(" in (i.string for i in tokens[i:]):
Expand Down
2 changes: 1 addition & 1 deletion pylint/checkers/mapreduce_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MapReduceMixin(metaclass=abc.ABCMeta):

@abc.abstractmethod
def get_map_data(self):
"""Returns mergable/reducible data that will be examined"""
"""Returns mergeable/reducible data that will be examined"""

@abc.abstractmethod
def reduce_map_data(self, linter, data):
Expand Down
4 changes: 2 additions & 2 deletions pylint/checkers/similar.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"""a similarities / code duplication command line tool and pylint checker

The algorithm is based on comparing the hash value of n successive lines of a file.
First the files are read and any line that doesn't fullfill requirement are removed (comments, docstrings...)
First the files are read and any line that doesn't fulfill requirement are removed (comments, docstrings...)
Those stripped lines are stored in the LineSet class which gives access to them.
Then each index of the stripped lines collection is associated with the hash of n successive entries of the stripped lines starting at the current index
(n is the minimum common lines option).
Expand Down Expand Up @@ -123,7 +123,7 @@ def __init__(
self.effective_cmn_lines_nb = effective_cmn_lines_nb


# Links the indices ot the starting line in both lineset's stripped lines to
# Links the indices to the starting line in both lineset's stripped lines to
# the start and end lines in both files
CplIndexToCplLines_T = Dict["LineSetStartCouple", CplSuccessiveLinesLimits]

Expand Down
2 changes: 1 addition & 1 deletion pylint/checkers/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ def _is_only_type_assignment(node: nodes.Name, defstmt: nodes.Statement) -> bool
if defstmt_frame == node_frame and not ref_node.lineno < node.lineno:
break

# If the parent of the local refence is anything but a AnnAssign
# If the parent of the local reference is anything but a AnnAssign
# Or if the AnnAssign adds a value the variable will now have a value
# var = 1 # OR
# var: int = 1
Expand Down
2 changes: 1 addition & 1 deletion pylint/epylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def lint(filename, options=()):
if line.startswith("No config file found"):
continue

# modify the file name thats output to reverse the path traversal we made
# modify the file name that's put out to reverse the path traversal we made
parts = line.split(":")
if parts and parts[0] == child_path:
line = ":".join([filename] + parts[1:])
Expand Down
2 changes: 1 addition & 1 deletion pylint/extensions/_check_docs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ class GoogleDocstring(Docstring):

re_property_returns_line = re.compile(
fr"""
^{re_multiple_type}: # indentifier
^{re_multiple_type}: # identifier
\s* (.*) # Summary line / description
""",
re.X | re.S | re.M,
Expand Down
6 changes: 3 additions & 3 deletions pylint/lint/pylinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def make_options():
"(only on the command line, not in the configuration file "
"where it should appear only once). "
'You can also use "--disable=all" to disable everything first '
"and then reenable specific checks. For example, if you want "
"and then re-enable specific checks. For example, if you want "
"to run only the similarities checker, you can use "
'"--disable=all --enable=similarities". '
"If you want to run only the classes checker, but have no "
Expand Down Expand Up @@ -750,7 +750,7 @@ def enable_fail_on_messages(self):
fail_on_cats = set()
fail_on_msgs = set()
for val in fail_on_vals:
# If value is a cateogry, add category, else add message
# If value is a category, add category, else add message
if val in MSG_TYPES:
fail_on_cats.add(val)
else:
Expand Down Expand Up @@ -1607,7 +1607,7 @@ def _set_msg_status(
line: Optional[int] = None,
ignore_unknown: bool = False,
) -> None:
"""Do some tests and then iterate over message defintions to set state"""
"""Do some tests and then iterate over message definitions to set state"""
assert scope in {"package", "module"}
if msgid == "all":
for _msgid in MSG_TYPES:
Expand Down
2 changes: 1 addition & 1 deletion pylint/lint/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def __init__(
if reporter:
# if a custom reporter is provided as argument, it may be overridden
# by file parameters, so re-set it here, but before command line
# parsing so it's still overrideable by command line option
# parsing so it's still overridable by command line option
linter.set_reporter(reporter)
try:
args = linter.load_command_line_configuration(args)
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ enable=
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
Expand Down
2 changes: 1 addition & 1 deletion tests/benchmark/test_baseline_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def test_baseline_lots_of_files_j1(self, benchmark):
"""Establish a baseline with only 'master' checker being run in -j1

We do not register any checkers except the default 'master', so the cost is just
that of the system with a lot of files registerd"""
that of the system with a lot of files registered"""
if benchmark.disabled:
benchmark(print, "skipping, only benchmark large file counts")
return # _only_ run this test is profiling
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/a/assign/assignment_from_no_return_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

'E1111': ('Assigning to function call which doesn\'t return',
'Used when an assignment is done on a function call but the \
infered function doesn\'t return anything.'),
inferred function doesn\'t return anything.'),
'W1111': ('Assigning to function call which only returns None',
'Used when an assignment is done on a function call but the \
infered function returns nothing but None.'),
inferred function returns nothing but None.'),

"""
from __future__ import generators, print_function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def test_finds_args_without_type_sphinx( # [inconsistent-return-statements]
named_arg, *args
):
r"""The Sphinx docstring
In Sphinx docstrings asteriks should be escaped.
In Sphinx docstrings asterisks should be escaped.
See https://github.com/PyCQA/pylint/issues/5406

:param named_arg: Returned
Expand All @@ -238,7 +238,7 @@ def test_finds_kwargs_without_type_sphinx( # [inconsistent-return-statements]
named_arg, **kwargs
):
r"""The Sphinx docstring
In Sphinx docstrings asteriks should be escaped.
In Sphinx docstrings asterisks should be escaped.
See https://github.com/PyCQA/pylint/issues/5406

:param named_arg: Returned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import typing


# Test redudant yields docstring variants
# Test redundant yields docstring variants
def my_func(self):
"""This is a docstring.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pylint: disable=invalid-name, undefined-variable


# Test redudant yields docstring variants
# Test redundant yields docstring variants
def my_func(self):
"""This is a docstring.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/m/method_hidden.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=too-few-public-methods, useless-object-inheritance,missing-docstring
# pylint: disable=unused-private-member
"""check method hidding ancestor attribute
"""check method hiding ancestor attribute
"""
from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/n/not_callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class UnknownBaseCallable(missing.Blah):
UnknownBaseCallable()()

# Regression test for #4426
# If property is inferrable we shouldn't double emit the message
# If property is inferable we shouldn't double emit the message
# See: https://github.com/PyCQA/pylint/issues/4426
class ClassWithProperty:
@property
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/o/overloaded_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def randint(maximum):

return int(5)

print(randint(1).astype()) # we don't wan't an error for astype access
print(randint(1).astype()) # we don't want an error for astype access
Loading