Skip to content

Commit 1594ff0

Browse files
Better capitalization in docstring, fixed number of char per line
1 parent fffde57 commit 1594ff0

File tree

563 files changed

+3184
-3346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

563 files changed

+3184
-3346
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
- --remove-duplicate-keys
2222
- --remove-unused-variables
2323
- repo: https://github.com/asottile/pyupgrade
24-
rev: v2.29.1
24+
rev: v2.30.1
2525
hooks:
2626
- id: pyupgrade
2727
args: [--py36-plus]

doc/exts/pylint_extensions.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
33
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
44

5-
"""Script used to generate the extensions file before building the actual documentation."""
5+
"""Script used to generate the extensions file before building the actual
6+
documentation.
7+
"""
68

79
import os
810
import re
@@ -23,7 +25,7 @@
2325

2426

2527
def builder_inited(app):
26-
"""Output full documentation in ReST format for all extension modules"""
28+
"""Output full documentation in ReST format for all extension modules."""
2729
# PACKAGE/docs/exts/pylint_extensions.py --> PACKAGE/
2830
base_path = os.path.dirname(
2931
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

doc/exts/pylint_features.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
33
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
44

5-
"""Script used to generate the features file before building the actual documentation."""
5+
"""Script used to generate the features file before building the actual
6+
documentation.
7+
"""
68

79
import os
810

doc/user_guide/message-control.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Here's an example with all these rules in a single place:
112112
pass
113113

114114
def meth1(self, arg):
115-
"""this issues a message"""
115+
"""This issues a message"""
116116
print(self)
117117

118118
def meth2(self, arg):
@@ -122,14 +122,14 @@ Here's an example with all these rules in a single place:
122122
+ "foo")
123123

124124
def meth3(self):
125-
"""test one line disabling"""
125+
"""Test one line disabling"""
126126
# no error
127127
print(self.bla) # pylint: disable=no-member
128128
# error
129129
print(self.blop)
130130

131131
def meth4(self):
132-
"""test re-enabling"""
132+
"""Test re-enabling"""
133133
# pylint: disable=no-member
134134
# no error
135135
print(self.bla)
@@ -139,7 +139,7 @@ Here's an example with all these rules in a single place:
139139
print(self.blip)
140140

141141
def meth5(self):
142-
"""test IF sub-block re-enabling"""
142+
"""Test IF sub-block re-enabling"""
143143
# pylint: disable=no-member
144144
# no error
145145
print(self.bla)
@@ -154,7 +154,7 @@ Here's an example with all these rules in a single place:
154154
print(self.blip)
155155

156156
def meth6(self):
157-
"""test TRY/EXCEPT sub-block re-enabling"""
157+
"""Test TRY/EXCEPT sub-block re-enabling"""
158158
# pylint: disable=no-member
159159
# no error
160160
print(self.bla)
@@ -169,7 +169,7 @@ Here's an example with all these rules in a single place:
169169
print(self.blip)
170170

171171
def meth7(self):
172-
"""test one line block opening disabling"""
172+
"""Test one line block opening disabling"""
173173
if self.blop: # pylint: disable=no-member
174174
# error
175175
print(self.blip)
@@ -180,7 +180,7 @@ Here's an example with all these rules in a single place:
180180
print(self.blip)
181181

182182
def meth8(self):
183-
"""test late disabling"""
183+
"""Test late disabling"""
184184
# error
185185
print(self.blip)
186186
# pylint: disable=no-member
@@ -189,7 +189,7 @@ Here's an example with all these rules in a single place:
189189
print(self.blop)
190190

191191
def meth9(self):
192-
"""test next line disabling"""
192+
"""Test next line disabling"""
193193
# no error
194194
# pylint: disable-next=no-member
195195
print(self.bla)

examples/custom_raw.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111

1212
class MyRawChecker(BaseChecker):
13-
"""check for line continuations with '\' instead of using triple
14-
quoted string or parenthesis
13+
"""Check for line continuations with '\' instead of using triple quoted string or
14+
parenthesis.
1515
"""
1616

1717
__implements__ = IRawChecker
@@ -30,7 +30,7 @@ class MyRawChecker(BaseChecker):
3030
options = ()
3131

3232
def process_module(self, node: nodes.Module) -> None:
33-
"""process a module
33+
"""Process a module.
3434
3535
the module's content is accessible via node.stream() function
3636
"""

examples/deprecation_checker.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"""Example checker detecting deprecated functions/methods. Following example searches for usages of
2-
deprecated function `deprecated_function` and deprecated method `MyClass.deprecated_method`
3-
from module mymodule:
1+
"""Example checker detecting deprecated functions/methods. Following example searches
2+
for usages of deprecated function `deprecated_function` and deprecated method
3+
`MyClass.deprecated_method` from module mymodule:
44
55
.. code-block:: console
66
$ cat mymodule.py
@@ -59,7 +59,8 @@ class DeprecationChecker(DeprecatedMixin, BaseChecker):
5959
name = "deprecated"
6060

6161
def deprecated_methods(self) -> Set[str]:
62-
"""Callback method called by DeprecatedMixin for every method/function found in the code.
62+
"""Callback method called by DeprecatedMixin for every method/function found in
63+
the code.
6364
6465
Returns:
6566
collections.abc.Container of deprecated function/method names.

pylint/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
def run_pylint(argv: Optional[Sequence[str]] = None):
22-
"""Run pylint
22+
"""Run pylint.
2323
2424
argv can be a sequence of strings normally supplied as arguments on the command line
2525
"""
@@ -32,7 +32,7 @@ def run_pylint(argv: Optional[Sequence[str]] = None):
3232

3333

3434
def run_epylint(argv: Optional[Sequence[str]] = None):
35-
"""Run epylint
35+
"""Run epylint.
3636
3737
argv can be a list of strings normally supplied as arguments on the command line
3838
"""
@@ -42,7 +42,7 @@ def run_epylint(argv: Optional[Sequence[str]] = None):
4242

4343

4444
def run_pyreverse(argv: Optional[Sequence[str]] = None):
45-
"""Run pyreverse
45+
"""Run pyreverse.
4646
4747
argv can be a sequence of strings normally supplied as arguments on the command line
4848
"""
@@ -52,7 +52,7 @@ def run_pyreverse(argv: Optional[Sequence[str]] = None):
5252

5353

5454
def run_symilar(argv: Optional[Sequence[str]] = None):
55-
"""Run symilar
55+
"""Run symilar.
5656
5757
argv can be a sequence of strings normally supplied as arguments on the command line
5858
"""

pylint/__pkginfo__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
def get_numversion_from_version(v: str) -> Tuple:
9-
"""Kept for compatibility reason
9+
"""Kept for compatibility reason.
1010
1111
See https://github.com/PyCQA/pylint/issues/4399
1212
https://github.com/PyCQA/pylint/issues/4420,

pylint/checkers/__init__.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
2020
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
2121

22-
"""utilities methods and classes for checkers
22+
"""Utilities methods and classes for checkers.
2323
2424
Base id of standard checkers (used in msg and report ids):
2525
01: base
@@ -44,7 +44,6 @@
4444
4545
The raw_metrics checker has no number associated since it doesn't emit any
4646
messages nor reports. XXX not true, emit a 07 report !
47-
4847
"""
4948

5049
import sys
@@ -66,9 +65,8 @@ def table_lines_from_stats(
6665
old_stats: Optional[LinterStats],
6766
stat_type: Literal["duplicated_lines", "message_types"],
6867
) -> List[str]:
69-
"""get values listed in <columns> from <stats> and <old_stats>,
70-
and return a formatted list of values, designed to be given to a
71-
ureport.Table object
68+
"""Get values listed in <columns> from <stats> and <old_stats>, and return a
69+
formatted list of values, designed to be given to a ureport.Table object.
7270
"""
7371
lines: List[str] = []
7472
if stat_type == "duplicated_lines":
@@ -129,7 +127,7 @@ def table_lines_from_stats(
129127

130128

131129
def initialize(linter):
132-
"""initialize linter with checkers in this package"""
130+
"""Initialize linter with checkers in this package."""
133131
register_plugins(linter, __path__[0])
134132

135133

0 commit comments

Comments
 (0)