Skip to content

Conversation

DanielNoord
Copy link
Owner

Closes #68.

Best viewed commit per commit. Sadly had to update a lot of test outputs as they do not adhere to the formatting of this checker.

@DanielNoord DanielNoord added the enhancement New feature or request label Apr 28, 2022
@DanielNoord DanielNoord added this to the 0.6.0 milestone Apr 28, 2022
@github-actions

This comment has been minimized.

@coveralls
Copy link

coveralls commented Apr 28, 2022

Pull Request Test Coverage Report for Build 2256445241

  • 8 of 8 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 2241932228: 0.0%
Covered Lines: 458
Relevant Lines: 458

💛 - Coveralls

@github-actions

This comment has been minimized.

@DanielNoord
Copy link
Owner Author

@Pierre-Sassoulas Note that the primer is a little trigger happy as we don't run with any commands. Since we have max-summary-lines=2 and the default being 1, it seems like a lot will change. But the changes are minimal.

@Pierre-Sassoulas
Copy link
Collaborator

For thing like :

-    """Get values listed in <columns> from <stats> and <old_stats>,
+    """Get values listed in <columns> from <stats> and <old_stats>,.

We could maybe replace the , by a . instead ?

@DanielNoord
Copy link
Owner Author

For thing like :

-    """Get values listed in <columns> from <stats> and <old_stats>,
+    """Get values listed in <columns> from <stats> and <old_stats>,.

We could maybe replace the , by a . instead ?

I thought about this, but then decided it was probably best to let the user decide whether they want to break the sentence there or not. Just replacing , with . might not always work so some user-input will always be needed.

@Pierre-Sassoulas
Copy link
Collaborator

-        """Iterate on similarities among all files, by making a Cartesian
+        """Iterate on similarities among all files, by making a Cartesian.
+
         product.

Diff like this are actually a pre-existing issue in pylint, I don't think we can do anything from there.

@DanielNoord DanielNoord requested review from Pierre-Sassoulas and removed request for Pierre-Sassoulas April 28, 2022 21:22
docs/usage.rst Outdated
Comment on lines 57 to 60
with the --max-summary-lines option. This formatter is
currently optional as its considered somwehat
opinionated and might require major refactoring for
existing projects. (default: True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with the --max-summary-lines option. This formatter is
currently optional as its considered somwehat
opinionated and might require major refactoring for
existing projects. (default: True)
with the --max-summary-lines option. (default: True)

@github-actions
Copy link

github-actions bot commented May 2, 2022

Diff from the primer, showing the effect of this PR on open source code:
pylint:

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/__init__.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/__init__.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/__init__.py
@@ -69,7 +69,8 @@
     old_stats: LinterStats | None,
     stat_type: Literal["duplicated_lines", "message_types"],
 ) -> list[str]:
-    """Get values listed in <columns> from <stats> and <old_stats>,
+    """Get values listed in <columns> from <stats> and <old_stats>,.
+
     and return a formatted list of values.
 
     The return value is designed to be given to a ureport.Table object

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/base/basic_checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base/basic_checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base/basic_checker.py
@@ -341,7 +341,8 @@
         self.linter.stats.node_count["module"] += 1
 
     def visit_classdef(self, _: nodes.ClassDef) -> None:
-        """Check module name, docstring and redefinition
+        """Check module name, docstring and redefinition.
+
         increment branch counter.
         """
         self.linter.stats.node_count["klass"] += 1
@@ -480,7 +481,8 @@
 
     @utils.only_required_for_messages("dangerous-default-value")
     def visit_functiondef(self, node: nodes.FunctionDef) -> None:
-        """Check function name, docstring, arguments, redefinition,
+        """Check function name, docstring, arguments, redefinition,.
+
         variable names, max locals.
         """
         if node.is_method():
@@ -546,7 +548,8 @@
 
     @utils.only_required_for_messages("unreachable")
     def visit_continue(self, node: nodes.Continue) -> None:
-        """Check is the node has a right sibling (if so, that's some unreachable
+        """Check is the node has a right sibling (if so, that's some unreachable.
+
         code).
         """
         self._check_unreachable(node)
@@ -567,7 +570,8 @@
 
     @utils.only_required_for_messages("unreachable")
     def visit_raise(self, node: nodes.Raise) -> None:
-        """Check if the node has a right sibling (if so, that's some unreachable
+        """Check if the node has a right sibling (if so, that's some unreachable.
+
         code).
         """
         self._check_unreachable(node)
@@ -597,7 +601,8 @@
         "eval-used", "exec-used", "bad-reversed-sequence", "misplaced-format-function"
     )
     def visit_call(self, node: nodes.Call) -> None:
-        """Visit a Call node -> check if this is not a disallowed builtin
+        """Visit a Call node -> check if this is not a disallowed builtin.
+
         call and check for * or ** use.
         """
         self._check_misplaced_format_function(node)
@@ -685,7 +690,8 @@
             self.add_message("unreachable", node=unreach_stmt)
 
     def _check_not_in_finally(self, node, node_name, breaker_classes=()):
-        """Check that a node is not inside a 'finally' clause of a
+        """Check that a node is not inside a 'finally' clause of a.
+
         'try...finally' statement.
 
         If we find a parent which type is in breaker_classes before

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/base/basic_error_checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base/basic_error_checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base/basic_error_checker.py
@@ -418,7 +418,8 @@
 
     @utils.only_required_for_messages("abstract-class-instantiated")
     def visit_call(self, node: nodes.Call) -> None:
-        """Check instantiating abstract class with
+        """Check instantiating abstract class with.
+
         abc.ABCMeta as metaclass.
         """
         for inferred in infer_all(node.func):

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/base/name_checker/checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base/name_checker/checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base/name_checker/checker.py
@@ -62,7 +62,8 @@
 
 
 def _redefines_import(node):
-    """Detect that the given node (AssignName) is inside an
+    """Detect that the given node (AssignName) is inside an.
+
     exception handler and redefines an import from the tryexcept body.
 
     Returns True if the node redefines an import, False otherwise.

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/base/name_checker/naming_style.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base/name_checker/naming_style.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base/name_checker/naming_style.py
@@ -11,7 +11,8 @@
 
 
 class NamingStyle:
-    """It may seem counter-intuitive 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.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/base_checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base_checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/base_checker.py
@@ -91,7 +91,8 @@
         return f"{status} '{self.name}' (responsible for '{msgs}')"
 
     def __str__(self) -> str:
-        """This might be incomplete because multiple classes inheriting BaseChecker
+        """This might be incomplete because multiple classes inheriting BaseChecker.
+
         can have the same name.
 
         See: MessageHandlerMixIn.get_full_documentation()

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/classes/class_checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/classes/class_checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/classes/class_checker.py
@@ -345,7 +345,8 @@
 
 
 def _called_in_methods(func, klass, methods):
-    """Check if the func was called in any of the given methods,
+    """Check if the func was called in any of the given methods,.
+
     belonging to the *klass*.
 
     Returns True if so, False otherwise.
@@ -819,7 +820,8 @@
             pass
 
     def _check_proper_bases(self, node):
-        """Detect that a class inherits something which is not
+        """Detect that a class inherits something which is not.
+
         a class or a type.
         """
         for base in node.bases:
@@ -1490,7 +1492,8 @@
     leave_asyncfunctiondef = leave_functiondef
 
     def visit_attribute(self, node: nodes.Attribute) -> None:
-        """Check if the getattr is an access to a class member
+        """Check if the getattr is an access to a class member.
+
         if so, register it.
 
         Also check for access to protected
@@ -1548,7 +1551,8 @@
         self.add_message("invalid-class-object", node=node)
 
     def _check_in_slots(self, node):
-        """Check that the given AssignAttr node
+        """Check that the given AssignAttr node.
+
         is defined in the class slots.
         """
         inferred = safe_infer(node.expr)
@@ -1665,7 +1669,8 @@
             self.add_message(msg, node=node.targets[0])
 
     def _check_protected_attribute_access(self, node: nodes.Attribute):
-        """Given an attribute access node (set or get), check if attribute
+        """Given an attribute access node (set or get), check if attribute.
+
         access is legitimate.
 
         Call _check_first_attr with node before calling
@@ -1813,7 +1818,8 @@
             return False
 
     def visit_name(self, node: nodes.Name) -> None:
-        """Check if the name handle an access to a class member
+        """Check if the name handle an access to a class member.
+
         if so, register it.
         """
         if self._first_attrs and (
@@ -1958,7 +1964,8 @@
             self.add_message(message, args=(method_name, valid), node=node)
 
     def _check_bases_classes(self, node):
-        """Check that the given class node implements abstract methods from
+        """Check that the given class node implements abstract methods from.
+
         base classes.
         """
 
@@ -1985,7 +1992,8 @@
             self.add_message("abstract-method", node=node, args=(name, owner.name))
 
     def _check_init(self, node: nodes.FunctionDef, klass_node: nodes.ClassDef) -> None:
-        """Check that the __init__ method call super or ancestors'__init__
+        """Check that the __init__ method call super or ancestors'__init__.
+
         method (unless it is used for type hinting with `typing.overload`).
         """
         if not self.linter.is_message_enabled(
@@ -2179,7 +2187,8 @@
 def _ancestors_to_call(
     klass_node: nodes.ClassDef, method="__init__"
 ) -> dict[nodes.ClassDef, bases.UnboundMethod]:
-    """Return a dictionary where keys are the list of base classes providing
+    """Return a dictionary where keys are the list of base classes providing.
+
     the queried method, and so that should/may be called from the method node.
     """
     to_call: dict[nodes.ClassDef, bases.UnboundMethod] = {}

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/classes/special_methods_checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/classes/special_methods_checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/classes/special_methods_checker.py
@@ -43,7 +43,8 @@
 
 
 class SpecialMethodsChecker(BaseChecker):
-    """Checker which verifies that special methods
+    """Checker which verifies that special methods.
+
     are implemented correctly.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/design_analysis.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/design_analysis.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/design_analysis.py
@@ -510,7 +510,8 @@
         "keyword-arg-before-vararg",
     )
     def visit_functiondef(self, node: nodes.FunctionDef) -> None:
-        """Check function name, docstring, arguments, redefinition,
+        """Check function name, docstring, arguments, redefinition,.
+
         variable names, max locals.
         """
         # init branch and returns counters
@@ -556,6 +557,7 @@
     )
     def leave_functiondef(self, node: nodes.FunctionDef) -> None:
         """Most of the work is done here on close:
+
         checks for max returns, branch, return in __init__.
         """
         returns = self._returns.pop()
@@ -590,7 +592,8 @@
         self._returns[-1] += 1
 
     def visit_default(self, node: nodes.NodeNG) -> None:
-        """Default visit method -> increments the statements counter if
+        """Default visit method -> increments the statements counter if.
+
         necessary.
         """
         if node.is_statement:
@@ -623,7 +626,8 @@
         self._inc_all_stmts(branches)
 
     def _check_boolean_expressions(self, node):
-        """Go through "if" node `node` and count its boolean expressions
+        """Go through "if" node `node` and count its boolean expressions.
+
         if the 'if' node test is a BoolOp node.
         """
         condition = node.test

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/imports.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/imports.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/imports.py
@@ -133,7 +133,8 @@
 
 
 def _make_tree_defs(mod_files_list):
-    """Get a list of 2-uple (module, list_of_files_which_import_this_module),
+    """Get a list of 2-uple (module, list_of_files_which_import_this_module),.
+
     it will return a dictionary to represent this as a tree.
     """
     tree_defs = {}
@@ -187,7 +188,8 @@
 def _make_graph(
     filename: str, dep_info: dict[str, set[str]], sect: Section, gtype: str
 ):
-    """Generate a dependencies graph and add some information about it in the
+    """Generate a dependencies graph and add some information about it in the.
+
     report's section.
     """
     outputfile = _dependencies_graph(filename, dep_info)
@@ -919,14 +921,16 @@
 
     @astroid.decorators.cached
     def _external_dependencies_info(self):
-        """Return cached external dependencies information or build and
+        """Return cached external dependencies information or build and.
+
         cache them.
         """
         return self._filter_dependencies_graph(internal=False)
 
     @astroid.decorators.cached
     def _internal_dependencies_info(self):
-        """Return cached internal dependencies information or build and
+        """Return cached internal dependencies information or build and.
+
         cache them.
         """
         return self._filter_dependencies_graph(internal=True)

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/newstyle.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/newstyle.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/newstyle.py
@@ -33,7 +33,8 @@
 
 
 class NewStyleConflictChecker(BaseChecker):
-    """Checks for usage of new style capabilities on old style classes and
+    """Checks for usage of new style capabilities on old style classes and.
+
     other new/old styles conflicts problems.
 
     * use of property, __slots__, super

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/non_ascii_names.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/non_ascii_names.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/non_ascii_names.py
@@ -2,7 +2,8 @@
 # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
 # Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
 
-"""All alphanumeric unicode character are allowed in Python but due
+"""All alphanumeric unicode character are allowed in Python but due.
+
 to similarities in how they look they can be confused.
 
 See: https://peps.python.org/pep-0672/#confusing-features

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/refactoring/implicit_booleaness_checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/refactoring/implicit_booleaness_checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/refactoring/implicit_booleaness_checker.py
@@ -126,7 +126,8 @@
 
     @utils.only_required_for_messages("use-implicit-booleaness-not-len")
     def visit_unaryop(self, node: nodes.UnaryOp) -> None:
-        """`not len(S)` must become `not S` regardless if the parent block
+        """`not len(S)` must become `not S` regardless if the parent block.
+
         is a test condition or something else (boolean expression) e.g. `if not len(S):`.
         """
         if (

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/refactoring/recommendation_checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/refactoring/recommendation_checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/refactoring/recommendation_checker.py
@@ -338,7 +338,8 @@
                 self._detect_replacable_format_call(node)
 
     def _detect_replacable_format_call(self, node: nodes.Const) -> None:
-        """Check whether a string is used in a call to format() or '%' and whether it
+        """Check whether a string is used in a call to format() or '%' and whether it.
+
         can be replaced by an f-string.
         """
         if (

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/refactoring/refactoring_checker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/refactoring/refactoring_checker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/refactoring/refactoring_checker.py
@@ -128,7 +128,8 @@
 
 
 def _is_part_of_with_items(node: nodes.Call) -> bool:
-    """Checks if one of the node's parents is a ``nodes.With`` node and that the node itself is located
+    """Checks if one of the node's parents is a ``nodes.With`` node and that the node itself is located.
+
     somewhere under its ``items``.
     """
     frame = node.frame(future=True)
@@ -143,7 +144,8 @@
 
 
 def _will_be_released_automatically(node: nodes.Call) -> bool:
-    """Checks if a call that could be used in a ``with`` statement is used in an alternative
+    """Checks if a call that could be used in a ``with`` statement is used in an alternative.
+
     construct which would ensure that its __exit__ method is called.
     """
     callables_taking_care_of_exit = frozenset(
@@ -161,7 +163,8 @@
 
 
 class ConsiderUsingWithStack(NamedTuple):
-    """Stack for objects that may potentially trigger a R1732 message
+    """Stack for objects that may potentially trigger a R1732 message.
+
     if they are not used in a ``with`` block later on.
     """
 
@@ -1857,7 +1860,8 @@
             return False
 
     def _check_return_at_the_end(self, node):
-        """Check for presence of a *single* return statement at the end of a
+        """Check for presence of a *single* return statement at the end of a.
+
         function.
 
         "return" or "return None" are useless because None is the

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/similar.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/similar.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/similar.py
@@ -85,7 +85,8 @@
 
 
 class CplSuccessiveLinesLimits:
-    """Holds a SuccessiveLinesLimits object for each file compared and a
+    """Holds a SuccessiveLinesLimits object for each file compared and a.
+
     counter on the number of common lines between both stripped lines collections extracted from both files.
     """
 
@@ -295,7 +296,8 @@
     stindex_2: Index,
     common_lines_nb: int,
 ) -> int:
-    """Return the effective number of common lines between lineset1
+    """Return the effective number of common lines between lineset1.
+
     and lineset2 filtered from non code lines.
 
     That is to say the number of common successive stripped
@@ -531,7 +533,8 @@
                 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]):

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/strings.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/strings.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/strings.py
@@ -200,7 +200,8 @@
 
 
 def get_access_path(key, parts):
-    """Given a list of format specifiers, returns
+    """Given a list of format specifiers, returns.
+
     the final access path (e.g. a.b.c[0][1]).
     """
     path = []
@@ -230,7 +231,8 @@
 
 
 class StringFormatChecker(BaseChecker):
-    """Checks string formatting operations to ensure that the format string
+    """Checks string formatting operations to ensure that the format string.
+
     is valid and the arguments match the format string.
     """
 
@@ -522,7 +524,8 @@
         self._check_new_format_specifiers(node, fields, named_arguments)
 
     def _check_new_format_specifiers(self, node, fields, named):
-        """Check attribute and index access in the format
+        """Check attribute and index access in the format.
+
         string ("{0.a}" and "{0[a]}").
         """
         for key, specifiers in fields:

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/typecheck.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/typecheck.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/typecheck.py
@@ -1190,7 +1190,8 @@
             self.add_message("non-str-assignment-to-dunder-name", node=node)
 
     def _check_uninferable_call(self, node):
-        """Check that the given uninferable Call node does not
+        """Check that the given uninferable Call node does not.
+
         call an actual function.
         """
         if not isinstance(node.func, nodes.Attribute):
@@ -1292,7 +1293,8 @@
 
     # pylint: disable=too-many-branches,too-many-locals
     def visit_call(self, node: nodes.Call) -> None:
-        """Check that called functions/methods are inferred to callable objects,
+        """Check that called functions/methods are inferred to callable objects,.
+
         and that passed arguments match the parameters in the inferred function.
         """
         called = safe_infer(node.func)
@@ -1491,7 +1493,8 @@
     def _keyword_argument_is_in_all_decorator_returns(
         func: nodes.FunctionDef, keyword: str
     ) -> bool:
-        """Check if the keyword argument exists in all signatures of the
+        """Check if the keyword argument exists in all signatures of the.
+
         return values of all decorators of the function.
         """
         if not func.decorators:

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/unicode.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/unicode.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/unicode.py
@@ -2,7 +2,8 @@
 # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
 # Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
 
-"""Unicode and some other ASCII characters can be used to create programs that run
+"""Unicode and some other ASCII characters can be used to create programs that run.
+
 much different compared to what a human reader would expect from them.
 
 PEP 672 lists some examples.

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/unsupported_version.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/unsupported_version.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/unsupported_version.py
@@ -2,7 +2,8 @@
 # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
 # Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
 
-"""Checker for features used that are not supported by all python versions
+"""Checker for features used that are not supported by all python versions.
+
 indicated by the py-version setting.
 """
 
@@ -24,7 +25,8 @@
 
 
 class UnsupportedVersionChecker(BaseChecker):
-    """Checker for features that are not supported by all python versions
+    """Checker for features that are not supported by all python versions.
+
     indicated by the py-version setting.
     """
 
@@ -62,7 +64,8 @@
         self._check_typing_final(node)
 
     def _check_typing_final(self, node: nodes.Decorators) -> None:
-        """Add a message when the `typing.final` decorator is used and the
+        """Add a message when the `typing.final` decorator is used and the.
+
         py-version is lower than 3.8.
         """
         if self._py38_plus:

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/utils.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/utils.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/utils.py
@@ -357,7 +357,8 @@
 
 
 def is_default_argument(node: nodes.NodeNG, scope: nodes.NodeNG | None = None) -> bool:
-    """Return true if the given Name node is used in function or lambda
+    """Return true if the given Name node is used in function or lambda.
+
     default argument's value.
     """
     if not scope:
@@ -393,7 +394,8 @@
 
 
 def is_ancestor_name(frame: nodes.ClassDef, node: nodes.NodeNG) -> bool:
-    """Return whether `frame` is an astroid.Class node with `node` in the
+    """Return whether `frame` is an astroid.Class node with `node` in the.
+
     subtree of its bases attribute.
     """
     if not isinstance(frame, nodes.ClassDef):
@@ -414,7 +416,8 @@
 
 
 def overrides_a_method(class_node: nodes.ClassDef, name: str) -> bool:
-    """Return True if <name> is a method overridden from an ancestor
+    """Return True if <name> is a method overridden from an ancestor.
+
     which is not the base object class.
     """
     for ancestor in class_node.ancestors():
@@ -428,7 +431,8 @@
 def only_required_for_messages(
     *messages: str,
 ) -> Callable[[AstCallbackMethod], AstCallbackMethod]:
-    """Decorator to store messages that are handled by a checker method as an
+    """Decorator to store messages that are handled by a checker method as an.
+
     attribute of the function object.
 
     This information is used by ``ASTWalker`` to decide whether to call the decorated
@@ -466,7 +470,8 @@
 
 
 class UnsupportedFormatCharacter(Exception):
-    """A format character in a format string is not one of the supported
+    """A format character in a format string is not one of the supported.
+
     format characters.
     """
 
@@ -559,7 +564,8 @@
 
 
 def collect_string_fields(format_string) -> Iterable[str | None]:
-    """Given a format string, return an iterator
+    """Given a format string, return an iterator.
+
     of all the valid format fields.
 
     It handles nested fields as well.
@@ -594,7 +600,8 @@
 def parse_format_method_string(
     format_string: str,
 ) -> tuple[list[tuple[str, list[tuple[bool, str]]]], int, int]:
-    """Parses a PEP 3101 format string, returning a tuple of
+    """Parses a PEP 3101 format string, returning a tuple of.
+
     (keyword_arguments, implicit_pos_args_cnt, explicit_pos_args).
 
     keyword_arguments is the set of mapping keys in the format string, implicit_pos_args_cnt
@@ -621,7 +628,8 @@
 
 
 def is_attr_protected(attrname: str) -> bool:
-    """Return True if attribute name is protected (start with _ and some other
+    """Return True if attribute name is protected (start with _ and some other.
+
     details), False otherwise.
     """
     return (
@@ -664,7 +672,8 @@
 
 
 def is_attr_private(attrname: str) -> Match[str] | None:
-    """Check that attribute name is private (at least two leading underscores,
+    """Check that attribute name is private (at least two leading underscores,.
+
     at most one trailing underscore).
     """
     regex = re.compile("^_{2,}.*[^_]+_?$")
@@ -702,7 +711,8 @@
 
 
 def inherit_from_std_ex(node: nodes.NodeNG | astroid.Instance) -> bool:
-    """Return whether the given class node is subclass of
+    """Return whether the given class node is subclass of.
+
     exceptions.Exception.
     """
     ancestors = node.ancestors() if hasattr(node, "ancestors") else []
@@ -714,7 +724,8 @@
 
 
 def error_of_type(handler: nodes.ExceptHandler, error_type) -> bool:
-    """Check if the given exception handler catches
+    """Check if the given exception handler catches.
+
     the given error_type.
 
     The *handler* parameter is a node, representing an ExceptHandler node.
@@ -1014,7 +1025,8 @@
 
 
 def is_node_inside_try_except(node: nodes.Raise) -> bool:
-    """Check if the node is directly under a Try/Except statement
+    """Check if the node is directly under a Try/Except statement.
+
     (but not under an ExceptHandler!).
 
     Args:
@@ -1040,7 +1052,8 @@
 
 
 def class_is_abstract(node: nodes.ClassDef) -> bool:
-    """Return true if the given class node should be considered as an abstract
+    """Return true if the given class node should be considered as an abstract.
+
     class.
     """
     # Only check for explicit metaclass=ABCMeta on this specific class
@@ -1384,7 +1397,8 @@
 def is_class_subscriptable_pep585_with_postponed_evaluation_enabled(
     value: nodes.ClassDef, node: nodes.NodeNG
 ) -> bool:
-    """Check if class is subscriptable with PEP 585 and
+    """Check if class is subscriptable with PEP 585 and.
+
     postponed evaluation enabled.
     """
     return (
@@ -1500,7 +1514,8 @@
 def is_attribute_typed_annotation(
     node: nodes.ClassDef | astroid.Instance, attr_name: str
 ) -> bool:
-    """Test if attribute is typed annotation in current node
+    """Test if attribute is typed annotation in current node.
+
     or any base nodes.
     """
     attribute = node.locals.get(attr_name, [None])[0]
@@ -1543,7 +1558,8 @@
 
 
 def get_iterating_dictionary_name(node: nodes.For | nodes.Comprehension) -> str | None:
-    """Get the name of the dictionary which keys are being iterated over on
+    """Get the name of the dictionary which keys are being iterated over on.
+
     a ``nodes.For`` or ``nodes.Comprehension`` node.
 
     If the iterating object is not either the keys method of a dictionary
@@ -1721,7 +1737,8 @@
 def get_node_first_ancestor_of_type_and_its_child(
     node: nodes.NodeNG, ancestor_type: type[T_Node] | tuple[type[T_Node], ...]
 ) -> tuple[None, None] | tuple[T_Node, nodes.NodeNG]:
-    """Modified version of get_node_first_ancestor_of_type to also return the
+    """Modified version of get_node_first_ancestor_of_type to also return the.
+
     descendant visited directly before reaching the sought ancestor.
 
     Useful for extracting whether a statement is guarded by a try, except, or finally

https://github.com/PyCQA/pylint/blob/main/pylint/checkers/variables.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/variables.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/checkers/variables.py
@@ -108,7 +108,8 @@
 
 
 class VariableVisitConsumerAction(Enum):
-    """Reported by _check_consumer() and its sub-methods to determine the
+    """Reported by _check_consumer() and its sub-methods to determine the.
+
     subsequent action to take in _undefined_and_used_before_checker().
 
     Continue -> continue loop to next consumer
@@ -151,7 +152,8 @@
 
 
 def _get_unpacking_extra_info(node, inferred):
-    """Return extra information to add to the message for unpacking-non-sequence
+    """Return extra information to add to the message for unpacking-non-sequence.
+
     and unbalanced-tuple-unpacking errors.
     """
     more = ""
@@ -252,7 +254,8 @@
 
 
 def _fix_dot_imports(not_consumed):
-    """Try to fix imports with multiple dots, by returning a dictionary
+    """Try to fix imports with multiple dots, by returning a dictionary.
+
     with the import names expanded.
 
     The function unflattens root imports,
@@ -546,7 +549,8 @@
 
     @property
     def consumed_uncertain(self) -> defaultdict[str, list[nodes.NodeNG]]:
-        """Retrieves nodes filtered out by get_next_to_consume() that may not
+        """Retrieves nodes filtered out by get_next_to_consume() that may not.
+
         have executed.
 
         These include nodes such as statements in except blocks, or statements
@@ -664,7 +668,8 @@
         node: nodes.NodeNG,
         node_statement: nodes.Statement,
     ) -> list[nodes.NodeNG]:
-        """Return any nodes in ``found_nodes`` that should be treated as uncertain
+        """Return any nodes in ``found_nodes`` that should be treated as uncertain.
+
         because they are in an except block.
         """
         uncertain_nodes = []
@@ -713,7 +718,8 @@
     def _defines_name_raises_or_returns(
         name: str, handler: nodes.ExceptHandler
     ) -> bool:
-        """Return True if some child of `handler` defines the name `name`,
+        """Return True if some child of `handler` defines the name `name`,.
+
         raises, or returns.
         """
 
@@ -831,7 +837,8 @@
     def _recursive_search_for_continue_before_break(
         stmt: nodes.Statement, break_stmt: nodes.Break
     ) -> bool:
-        """Return True if any Continue node can be found in descendants of `stmt`
+        """Return True if any Continue node can be found in descendants of `stmt`.
+
         before encountering `break_stmt`, ignoring any nested loops.
         """
         if stmt is break_stmt:
@@ -851,7 +858,8 @@
     def _uncertain_nodes_in_try_blocks_when_evaluating_except_blocks(
         found_nodes: list[nodes.NodeNG], node_statement: nodes.Statement
     ) -> list[nodes.NodeNG]:
-        """Return any nodes in ``found_nodes`` that should be treated as uncertain because they
+        """Return any nodes in ``found_nodes`` that should be treated as uncertain because they.
+
         are in a try block and the ``node_statement`` being evaluated is in one of its except handlers.
         """
         uncertain_nodes: list[nodes.NodeNG] = []
@@ -1075,7 +1083,8 @@
         self._store_type_annotation_names(node)
 
     def visit_module(self, node: nodes.Module) -> None:
-        """Visit module : update consumption analysis variable
+        """Visit module : update consumption analysis variable.
+
         checks globals doesn't overrides builtins.
         """
         self._to_consume = [NamesConsumer(node, "module")]
@@ -1411,7 +1420,8 @@
     def _should_node_be_skipped(
         self, node: nodes.Name, consumer: NamesConsumer, is_start_index: bool
     ) -> bool:
-        """Tests a consumer and node for various conditions in which the node
+        """Tests a consumer and node for various conditions in which the node.
+
         shouldn't be checked for the undefined-variable and used-before-assignment checks.
         """
         if consumer.scope_type == "class":
@@ -1452,7 +1462,8 @@
         target: nodes.AssignName | nodes.BaseContainer,
         target_names: list[str],
     ) -> None:
-        """Update `target_names` in place with the names of assignment
+        """Update `target_names` in place with the names of assignment.
+
         targets, recursively (to account for nested assignments).
         """
         if isinstance(target, nodes.AssignName):
@@ -1714,7 +1725,8 @@
         "unbalanced-tuple-unpacking", "unpacking-non-sequence", "self-cls-assignment"
     )
     def visit_assign(self, node: nodes.Assign) -> None:
-        """Check unbalanced tuple unpacking for assignments and unpacking
+        """Check unbalanced tuple unpacking for assignments and unpacking.
+
         non-sequences as well as in case self/cls get assigned.
         """
         self._check_self_cls_assign(node)
@@ -2002,7 +2014,8 @@
 
     @staticmethod
     def _maybe_used_and_assigned_at_once(defstmt: nodes.Statement) -> bool:
-        """Check if `defstmt` has the potential to use and assign a name in the
+        """Check if `defstmt` has the potential to use and assign a name in the.
+
         same statement.
         """
         if isinstance(defstmt.value, nodes.BaseContainer) and defstmt.value.elts:
@@ -2079,7 +2092,8 @@
     def _is_first_level_self_reference(
         node: nodes.Name, defstmt: nodes.ClassDef, found_nodes: list[nodes.NodeNG]
     ) -> tuple[VariableVisitConsumerAction, list[nodes.NodeNG] | None]:
-        """Check if a first level method's annotation or default values
+        """Check if a first level method's annotation or default values.
+
         refers to its own class, and return a consumer action.
         """
         if node.frame(future=True).parent == defstmt and node.statement(
@@ -2102,7 +2116,8 @@
     def _is_never_evaluated(
         defnode: nodes.NamedExpr, defnode_parent: nodes.IfExp
     ) -> bool:
-        """Check if a NamedExpr is inside a side of if ... else that never
+        """Check if a NamedExpr is inside a side of if ... else that never.
+
         gets evaluated.
         """
         inferred_test = utils.safe_infer(defnode_parent.test)
@@ -2530,7 +2545,8 @@
             self.add_message("self-cls-assignment", node=node, args=(self_cls_name,))
 
     def _check_unpacking(self, inferred, node, targets):
-        """Check for unbalanced tuple unpacking
+        """Check for unbalanced tuple unpacking.
+
         and unpacking non sequences.
         """
         if utils.is_inside_abstract_class(node):
@@ -2583,7 +2599,8 @@
         return None
 
     def _check_module_attrs(self, node, module, module_names):
-        """Check that module_names (list of string) are accessible through the
+        """Check that module_names (list of string) are accessible through the.
+
         given module, if the latest access name corresponds to a module, return it.
         """
         while module_names:

https://github.com/PyCQA/pylint/blob/main/pylint/config/arguments_manager.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/arguments_manager.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/arguments_manager.py
@@ -377,7 +377,8 @@
     def optik_option(
         self, provider: ConfigProvider, opt: str, optdict: OptionDict
     ) -> tuple[list[str], OptionDict]:  # pragma: no cover
-        """DEPRECATED: Get our personal option definition and return a suitable form for
+        """DEPRECATED: Get our personal option definition and return a suitable form for.
+
         use with optik/optparse.
         """
         warnings.warn(
@@ -415,7 +416,8 @@
     def generate_config(
         self, stream: TextIO | None = None, skipsections: tuple[str, ...] = ()
     ) -> None:  # pragma: no cover
-        """DEPRECATED: Write a configuration file according to the current configuration
+        """DEPRECATED: Write a configuration file according to the current configuration.
+
         into the given stream or stdout.
         """
         warnings.warn(
@@ -484,7 +486,8 @@
     def read_config_file(
         self, config_file: Path | None = None, verbose: bool = False
     ) -> None:  # pragma: no cover
-        """DEPRECATED: Read the configuration file but do not load it (i.e. dispatching
+        """DEPRECATED: Read the configuration file but do not load it (i.e. dispatching.
+
         values to each option's provider).
 
         :raises OSError: When the specified config file doesn't exist
@@ -557,7 +560,8 @@
                     parser.set(section_name, option, value=value)
 
     def load_config_file(self) -> None:  # pragma: no cover
-        """DEPRECATED: Dispatch values previously read from a configuration file to each
+        """DEPRECATED: Dispatch values previously read from a configuration file to each.
+
         option's provider.
         """
         warnings.warn(

https://github.com/PyCQA/pylint/blob/main/pylint/config/config_initialization.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/config_initialization.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/config_initialization.py
@@ -24,7 +24,8 @@
     config_file: None | str | Path = None,
     verbose_mode: bool = False,
 ) -> list[str]:
-    """Parse all available options, read config files and command line arguments and
+    """Parse all available options, read config files and command line arguments and.
+
     set options accordingly.
     """
     config_file = Path(config_file) if config_file else None

https://github.com/PyCQA/pylint/blob/main/pylint/config/configuration_mixin.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/configuration_mixin.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/configuration_mixin.py
@@ -9,7 +9,8 @@
 
 
 class ConfigurationMixIn(OptionsManagerMixIn, OptionsProviderMixIn):
-    """Basic mixin for simple configurations which don't need the
+    """Basic mixin for simple configurations which don't need the.
+
     manager / providers model.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/config/exceptions.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/exceptions.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/exceptions.py
@@ -6,7 +6,8 @@
 
 
 class UnrecognizedArgumentAction(Exception):
-    """Raised if an ArgumentManager instance tries to add an argument for which the action
+    """Raised if an ArgumentManager instance tries to add an argument for which the action.
+
     is not recognized.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/config/option_manager_mixin.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/option_manager_mixin.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/config/option_manager_mixin.py
@@ -145,7 +145,8 @@
         self._maxlevel = max(self._maxlevel, option.level or 0)
 
     def optik_option(self, provider, opt, optdict):
-        """Get our personal option definition and return a suitable form for
+        """Get our personal option definition and return a suitable form for.
+
         use with optik/optparse.
         """
         optdict = copy.copy(optdict)
@@ -195,7 +196,8 @@
     def generate_config(
         self, stream: TextIO | None = None, skipsections: tuple[str, ...] = ()
     ) -> None:
-        """Write a configuration file according to the current configuration
+        """Write a configuration file according to the current configuration.
+
         into the given stream or stdout.
         """
         options_by_section: dict[str, list[tuple[str, OptionDict, Any]]] = {}
@@ -235,7 +237,8 @@
     def read_config_file(
         self, config_file: Path | None = None, verbose: bool = False
     ) -> None:
-        """Read the configuration file but do not load it (i.e. dispatching
+        """Read the configuration file but do not load it (i.e. dispatching.
+
         values to each option's provider).
         """
         if config_file:
@@ -301,7 +304,8 @@
                     parser.set(section_name, option, value=value)
 
     def load_config_file(self):
-        """Dispatch values previously read from a configuration file to each
+        """Dispatch values previously read from a configuration file to each.
+
         option's provider.
         """
         parser = self.cfgfile_parser

https://github.com/PyCQA/pylint/blob/main/pylint/epylint.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/epylint.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/epylint.py
@@ -54,7 +54,8 @@
 
 
 def _get_env() -> dict[str, str]:
-    """Extracts the environment PYTHONPATH and appends the current 'sys.path'
+    """Extracts the environment PYTHONPATH and appends the current 'sys.path'.
+
     to it.
     """
     env = dict(os.environ)

https://github.com/PyCQA/pylint/blob/main/pylint/extensions/comparison_placement.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/comparison_placement.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/comparison_placement.py
@@ -2,7 +2,8 @@
 # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
 # Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
 
-"""Checks for yoda comparisons (variable before constant)
+"""Checks for yoda comparisons (variable before constant).
+
 See https://en.wikipedia.org/wiki/Yoda_conditions.
 """
 

https://github.com/PyCQA/pylint/blob/main/pylint/extensions/docparams.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/docparams.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/docparams.py
@@ -371,7 +371,8 @@
         expected_argument_names: set[str],
         warning_node: nodes.NodeNG,
     ) -> None:
-        """Compare the found argument names with the expected ones and
+        """Compare the found argument names with the expected ones and.
+
         generate a message if there are arguments missing.
 
         :param found_argument_names: argument names found in the docstring
@@ -410,7 +411,8 @@
         expected_argument_names: set[str],
         warning_node: nodes.NodeNG,
     ) -> None:
-        """Compare the found argument names with the expected ones and
+        """Compare the found argument names with the expected ones and.
+
         generate a message if there are extra arguments found.
 
         :param found_argument_names: argument names found in the docstring
@@ -451,7 +453,8 @@
         ignored_argument_names,
         warning_node,
     ):
-        """Compare the found argument names with the ignored ones and
+        """Compare the found argument names with the ignored ones and.
+
         generate a message if there are ignored arguments found.
 
         :param found_argument_names: argument names found in the docstring
@@ -482,7 +485,8 @@
         warning_node: astroid.NodeNG,
         accept_no_param_doc: bool | None = None,
     ):
-        """Check that all parameters are consistent with the parameters mentioned
+        """Check that all parameters are consistent with the parameters mentioned.
+
         in the parameter documentation (e.g. the Sphinx tags 'param' and 'type').
 
         * Undocumented parameters except 'self' are noticed.

https://github.com/PyCQA/pylint/blob/main/pylint/extensions/for_any_all.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/for_any_all.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/for_any_all.py
@@ -52,7 +52,8 @@
 
     @staticmethod
     def _build_suggested_string(node: nodes.For, final_return_bool: bool) -> str:
-        """When a nodes.For node can be rewritten as an any/all statement, return a suggestion for that statement
+        """When a nodes.For node can be rewritten as an any/all statement, return a suggestion for that statement.
+
         final_return_bool is the boolean literal returned after the for loop if all conditions fail.
         """
         loop_var = node.target.as_string()

https://github.com/PyCQA/pylint/blob/main/pylint/extensions/mccabe.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/mccabe.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/mccabe.py
@@ -144,7 +144,8 @@
 
 
 class McCabeMethodChecker(checkers.BaseChecker):
-    """Checks McCabe complexity cyclomatic threshold in methods and functions
+    """Checks McCabe complexity cyclomatic threshold in methods and functions.
+
     to validate a too complex code.
     """
 
@@ -172,7 +173,8 @@
 
     @only_required_for_messages("too-complex")
     def visit_module(self, node: nodes.Module) -> None:
-        """Visit an astroid.Module node to check too complex rating and
+        """Visit an astroid.Module node to check too complex rating and.
+
         add message if is greater than max_complexity stored from options.
         """
         visitor = PathGraphingAstVisitor()

https://github.com/PyCQA/pylint/blob/main/pylint/extensions/overlapping_exceptions.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/overlapping_exceptions.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/overlapping_exceptions.py
@@ -20,7 +20,8 @@
 
 
 class OverlappingExceptionsChecker(checkers.BaseChecker):
-    """Checks for two or more exceptions in the same exception handler
+    """Checks for two or more exceptions in the same exception handler.
+
     clause that are identical or parts of the same inheritance hierarchy.
 
     (i.e. overlapping).

https://github.com/PyCQA/pylint/blob/main/pylint/extensions/private_import.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/private_import.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/private_import.py
@@ -102,7 +102,8 @@
 
     @staticmethod
     def _name_is_private(name: str) -> bool:
-        """Returns true if the name exists, starts with `_`, and if len(name) > 4
+        """Returns true if the name exists, starts with `_`, and if len(name) > 4.
+
         it is not a dunder, i.e. it does not begin and end with two underscores.
         """
         return (
@@ -132,7 +133,8 @@
     def _populate_type_annotations(
         self, node: nodes.LocalsDictNodeNG, all_used_type_annotations: dict[str, bool]
     ) -> None:
-        """Adds into the dict `all_used_type_annotations` the names of all names ever used as a type annotation
+        """Adds into the dict `all_used_type_annotations` the names of all names ever used as a type annotation.
+
         in the scope and nested scopes of node and whether these names are only used for type checking.
         """
         for name in node.locals:
@@ -170,7 +172,8 @@
     def _populate_type_annotations_function(
         self, node: nodes.FunctionDef, all_used_type_annotations: dict[str, bool]
     ) -> None:
-        """Adds into the dict `all_used_type_annotations` the names of all names used as a type annotation
+        """Adds into the dict `all_used_type_annotations` the names of all names used as a type annotation.
+
         in the arguments and return type of the function node.
         """
         if node.args and node.args.annotations:
@@ -188,7 +191,8 @@
         node: nodes.Attribute | nodes.Subscript | nodes.Name | None,
         all_used_type_annotations: dict[str, bool],
     ) -> str | None:
-        """Handles the possibility of an annotation either being a Name, i.e. just type,
+        """Handles the possibility of an annotation either being a Name, i.e. just type,.
+
         or a Subscript e.g. `Optional[type]` or an Attribute, e.g. `pylint.lint.linter`.
         """
         if isinstance(node, nodes.Name) and node.name not in all_used_type_annotations:

https://github.com/PyCQA/pylint/blob/main/pylint/extensions/typing.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/typing.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/extensions/typing.py
@@ -151,12 +151,14 @@
     )
 
     _should_check_typing_alias: bool
-    """The use of type aliases (PEP 585) requires Python 3.9
+    """The use of type aliases (PEP 585) requires Python 3.9.
+
     or Python 3.7+ with postponed evaluation.
     """
 
     _should_check_alternative_union_syntax: bool
-    """The use of alternative union syntax (PEP 604) requires Python 3.10
+    """The use of alternative union syntax (PEP 604) requires Python 3.10.
+
     or Python 3.7+ with postponed evaluation.
     """
 
@@ -307,7 +309,8 @@
 
     @only_required_for_messages("consider-using-alias", "deprecated-typing-alias")
     def leave_module(self, node: nodes.Module) -> None:
-        """After parsing of module is complete, add messages for
+        """After parsing of module is complete, add messages for.
+
         'consider-using-alias' check.
 
         Make sure results are safe to recommend / collision free.

https://github.com/PyCQA/pylint/blob/main/pylint/graph.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/graph.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/graph.py
@@ -166,7 +166,8 @@
 def get_cycles(
     graph_dict: dict[str, set[str]], vertices: list[str] | None = None
 ) -> Sequence[list[str]]:
-    """Return a list of detected cycles in a dictionary representing an ordered graph
+    """Return a list of detected cycles in a dictionary representing an ordered graph.
+
     (i.e. key are vertices and values is a list of destination vertices representing edges).
     """
     if not graph_dict:

https://github.com/PyCQA/pylint/blob/main/pylint/interfaces.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/interfaces.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/interfaces.py
@@ -116,7 +116,8 @@
 
 
 class IAstroidChecker(IChecker):
-    """Interface for checker which prefers receive events according to
+    """Interface for checker which prefers receive events according to.
+
     statement type.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/lint/expand_modules.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/lint/expand_modules.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/lint/expand_modules.py
@@ -24,7 +24,8 @@
 
 
 def get_python_path(filepath: str) -> str:
-    """TODO This get the python path with the (bad) assumption that there is always
+    """TODO This get the python path with the (bad) assumption that there is always.
+
     an __init__.py.
 
     This is not true since python 3.3 and is causing problem.
@@ -52,7 +53,8 @@
     ignore_list_re: list[Pattern[str]],
     ignore_list_paths_re: list[Pattern[str]],
 ) -> tuple[list[ModuleDescriptionDict], list[ErrorDescriptionDict]]:
-    """Take a list of files/modules/packages and return the list of tuple
+    """Take a list of files/modules/packages and return the list of tuple.
+
     (file, module name) which have to be actually checked.
     """
     result: list[ModuleDescriptionDict] = []

https://github.com/PyCQA/pylint/blob/main/pylint/lint/pylinter.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/lint/pylinter.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/lint/pylinter.py
@@ -527,7 +527,8 @@
     # see func_block_disable_msg.py test case for expected behaviour
 
     def process_tokens(self, tokens: list[tokenize.TokenInfo]) -> None:
-        """Process tokens from the current module to search for module/block level
+        """Process tokens from the current module to search for module/block level.
+
         options.
         """
         control_pragmas = {"disable", "disable-next", "enable"}
@@ -862,7 +863,8 @@
     def set_current_module(
         self, modname: str | None, filepath: str | None = None
     ) -> None:
-        """Set the name of the currently analyzed module and
+        """Set the name of the currently analyzed module and.
+
         init statistics for it.
         """
         if not modname and filepath is None:
@@ -1229,7 +1231,8 @@
         end_lineno: int | None,
         end_col_offset: int | None,
     ) -> None:
-        """After various checks have passed a single Message is
+        """After various checks have passed a single Message is.
+
         passed to the reporter and added to stats.
         """
         message_definition.check_message_definition(line, node)
@@ -1473,7 +1476,8 @@
     def _register_by_id_managed_msg(
         self, msgid_or_symbol: str, line: int | None, is_disabled: bool = True
     ) -> None:
-        """If the msgid is a numeric one, then register it to inform the user
+        """If the msgid is a numeric one, then register it to inform the user.
+
         it could furnish instead a symbolic msgid.
         """
         if msgid_or_symbol[1:].isdigit():

https://github.com/PyCQA/pylint/blob/main/pylint/message/message_definition_store.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/message/message_definition_store.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/message/message_definition_store.py
@@ -19,7 +19,8 @@
 
 class MessageDefinitionStore:
 
-    """The messages store knows information about every possible message definition but has
+    """The messages store knows information about every possible message definition but has.
+
     no particular state during analysis.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/pyreverse/diadefslib.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/pyreverse/diadefslib.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/pyreverse/diadefslib.py
@@ -168,7 +168,8 @@
 
 
 class ClassDiadefGenerator(DiaDefGenerator):
-    """Generate a class diagram definition including all classes related to a
+    """Generate a class diagram definition including all classes related to a.
+
     given class.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/pyreverse/diagrams.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/pyreverse/diagrams.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/pyreverse/diagrams.py
@@ -218,6 +218,7 @@
 
     def get_module(self, name, node):
         """Return a module by its name, looking also for relative imports;
+
         raise KeyError if not found.
         """
         for mod in self.modules():

https://github.com/PyCQA/pylint/blob/main/pylint/pyreverse/utils.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/pyreverse/utils.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/pyreverse/utils.py
@@ -65,14 +65,16 @@
 
 
 def is_abstract(node):
-    """Return true if the given class node correspond to an abstract class
+    """Return true if the given class node correspond to an abstract class.
+
     definition.
     """
     return ABSTRACT.match(node.name)
 
 
 def is_final(node):
-    """Return true if the given class/function node correspond to final
+    """Return true if the given class/function node correspond to final.
+
     definition.
     """
     return FINAL.match(node.name)
@@ -254,7 +256,8 @@
 
 
 def infer_node(node: nodes.AssignAttr | nodes.AssignName) -> set:
-    """Return a set containing the node annotation if it exists
+    """Return a set containing the node annotation if it exists.
+
     otherwise return a set of the inferred types using the NodeNG.infer method.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/pyreverse/vcg_printer.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/pyreverse/vcg_printer.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/pyreverse/vcg_printer.py
@@ -2,7 +2,8 @@
 # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
 # Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
 
-"""Functions to generate files readable with George Sander's vcg
+"""Functions to generate files readable with George Sander's vcg.
+
 (Visualization of Compiler Graphs).
 
 You can download vcg at https://rw4.cs.uni-sb.de/~sander/html/gshome.html

https://github.com/PyCQA/pylint/blob/main/pylint/reporters/reports_handler_mix_in.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/reporters/reports_handler_mix_in.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/reporters/reports_handler_mix_in.py
@@ -21,7 +21,8 @@
 
 
 class ReportsHandlerMixIn:
-    """A mix-in class containing all the reports and stats manipulation
+    """A mix-in class containing all the reports and stats manipulation.
+
     related methods for the main lint class.
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/reporters/text.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/reporters/text.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/reporters/text.py
@@ -31,7 +31,8 @@
     """Styling of a message."""
 
     color: str | None
-    """The color name (see `ANSI_COLORS` for available values)
+    """The color name (see `ANSI_COLORS` for available values).
+
     or the color number when 256 colors are available.
     """
     style: tuple[str, ...] = ()
@@ -210,7 +211,8 @@
 
 
 class ParseableTextReporter(TextReporter):
-    """A reporter very similar to TextReporter, but display messages in a form
+    """A reporter very similar to TextReporter, but display messages in a form.
+
     recognized by most text editors :
 
     <filename>:<linenum>:<msg>
@@ -286,7 +288,8 @@
         return self.color_mapping.get(msg_id[0]) or MessageStyle(None)
 
     def handle_message(self, msg: Message) -> None:
-        """Manage message of different types, and colorize output
+        """Manage message of different types, and colorize output.
+
         using ANSI escape codes.
         """
         if msg.module not in self._modules:

https://github.com/PyCQA/pylint/blob/main/pylint/reporters/ureports/base_writer.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/reporters/ureports/base_writer.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/reporters/ureports/base_writer.py
@@ -49,7 +49,8 @@
         self.end_format()
 
     def format_children(self, layout: EvaluationSection | Paragraph | Section) -> None:
-        """Recurse on the layout children and call their accept method
+        """Recurse on the layout children and call their accept method.
+
         (see the Visitor pattern).
         """
         for child in getattr(layout, "children", ()):
@@ -88,7 +89,8 @@
         return result
 
     def compute_content(self, layout: BaseLayout) -> Iterator[str]:
-        """Trick to compute the formatting of children layout before actually
+        """Trick to compute the formatting of children layout before actually.
+
         writing it.
 
         return an iterator on strings (one for each child element)

https://github.com/PyCQA/pylint/blob/main/pylint/reporters/ureports/text_writer.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/reporters/ureports/text_writer.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/reporters/ureports/text_writer.py
@@ -26,7 +26,8 @@
 
 
 class TextWriter(BaseWriter):
-    """Format layouts as text
+    """Format layouts as text.
+
     (ReStructured inspiration but not totally handled yet).
     """
 

https://github.com/PyCQA/pylint/blob/main/pylint/testutils/output_line.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/testutils/output_line.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/testutils/output_line.py
@@ -111,7 +111,8 @@
 
     @staticmethod
     def _get_py38_none_value(value: _T, check_endline: bool) -> _T | None:
-        """Used to make end_line and end_column None as indicated by our version compared to
+        """Used to make end_line and end_column None as indicated by our version compared to.
+
         `min_pyver_end_position`.
         """
         if not check_endline:
@@ -122,7 +123,8 @@
     def from_csv(
         cls, row: Sequence[str] | str, check_endline: bool = True
     ) -> OutputLine:
-        """Create an OutputLine from a comma separated list (the functional tests expected
+        """Create an OutputLine from a comma separated list (the functional tests expected.
+
         output .txt files).
         """
         if isinstance(row, str):
@@ -174,7 +176,8 @@
             raise MalformedOutputLineException(row, e) from e
 
     def to_csv(self) -> tuple[str, str, str, str, str, str, str, str]:
-        """Convert an OutputLine to a tuple of string to be written by a
+        """Convert an OutputLine to a tuple of string to be written by a.
+
         csv-writer.
         """
         return (

https://github.com/PyCQA/pylint/blob/main/pylint/utils/__init__.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/__init__.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/__init__.py
@@ -2,7 +2,8 @@
 # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
 # Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt
 
-"""Some various utilities and helper classes, most of them used in the
+"""Some various utilities and helper classes, most of them used in the.
+
 main pylint class.
 """
 

https://github.com/PyCQA/pylint/blob/main/pylint/utils/ast_walker.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/ast_walker.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/ast_walker.py
@@ -62,7 +62,8 @@
         # For now, we have no "leave_default" method in Pylint
 
     def walk(self, astroid: nodes.NodeNG) -> None:
-        """Call visit events of astroid checkers for the given node, recurse on
+        """Call visit events of astroid checkers for the given node, recurse on.
+
         its children, then leave events.
         """
         cid = astroid.__class__.__name__.lower()

https://github.com/PyCQA/pylint/blob/main/pylint/utils/file_state.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/file_state.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/file_state.py
@@ -61,7 +61,8 @@
         node: nodes.NodeNG,
         msg_state: MessageStateDict,
     ) -> None:
-        """Recursively walk (depth first) AST to collect block level options
+        """Recursively walk (depth first) AST to collect block level options.
+
         line numbers.
         """
         for child in node.get_children():

https://github.com/PyCQA/pylint/blob/main/pylint/utils/pragma_parser.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/pragma_parser.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/pragma_parser.py
@@ -68,7 +68,8 @@
     """A class for exceptions thrown by pragma_parser module."""
 
     def __init__(self, message: str, token: str) -> None:
-        """:args message: explain the reason why the exception has been thrown
+        """:args message: explain the reason why the exception has been thrown.
+
         :args token: token concerned by the exception.
         """
         self.message = message

https://github.com/PyCQA/pylint/blob/main/pylint/utils/utils.py

--- ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/utils.py
+++ ../.pydocstringformatter_primer_tests/PyCQA/pylint/pylint/utils/utils.py
@@ -106,7 +106,8 @@
 
 
 def diff_string(old: int | float, new: int | float) -> str:
-    """Given an old and new int value, return a string representing the
+    """Given an old and new int value, return a string representing the.
+
     difference.
     """
     diff = abs(old - new)
@@ -180,7 +181,8 @@
 
 
 def register_plugins(linter: PyLinter, directory: str) -> None:
-    """Load all module and package in the given directory, looking for a
+    """Load all module and package in the given directory, looking for a.
+
     'register' function in each one, used to register pylint checkers.
     """
     imported = {}
@@ -267,7 +269,8 @@
     option: GLOBAL_OPTION_NAMES,
     default: T_GlobalOptionReturnTypes | None = None,  # pylint: disable=unused-argument
 ) -> T_GlobalOptionReturnTypes | None | Any:
-    """DEPRECATED: Retrieve an option defined by the given *checker* or
+    """DEPRECATED: Retrieve an option defined by the given *checker* or.
+
     by all known option providers.
 
     It will look in the list of all options providers
@@ -283,7 +286,8 @@
 
 
 def _splitstrip(string: str, sep: str = ",") -> list[str]:
-    """Return a list of stripped string by splitting the string given as
+    """Return a list of stripped string by splitting the string given as.
+
     argument on `sep` (',' by default), empty strings are discarded.
 
     >>> _splitstrip('a, b, c   ,  4,,')

@DanielNoord DanielNoord merged commit 1a7b191 into main May 2, 2022
@DanielNoord DanielNoord deleted the splitter branch May 2, 2022 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make SplitSummaryAndDocstringFormatter non-optional
3 participants