diff options
author | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-05-23 16:05:07 +0200 |
---|---|---|
committer | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-05-23 16:10:57 +0200 |
commit | 3e6000af9d4600598a3fe71d0053bbc6cac02887 (patch) | |
tree | 5310797c0eda1e050f5b533658c3c730b8b201b7 /pylint/extensions | |
parent | b4f5c4482e37045d75188bc3087196a70cdbe575 (diff) | |
download | pylint-git-3e6000af9d4600598a3fe71d0053bbc6cac02887.tar.gz |
Enable line-wrapping from ``pydocstringformatter``
Diffstat (limited to 'pylint/extensions')
-rw-r--r-- | pylint/extensions/for_any_all.py | 7 | ||||
-rw-r--r-- | pylint/extensions/private_import.py | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/pylint/extensions/for_any_all.py b/pylint/extensions/for_any_all.py index 2e7b0cf41..e6ab41c3f 100644 --- a/pylint/extensions/for_any_all.py +++ b/pylint/extensions/for_any_all.py @@ -52,8 +52,11 @@ class ConsiderUsingAnyOrAllChecker(BaseChecker): @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 - final_return_bool is the boolean literal returned after the for loop if all conditions fail. + """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() loop_iter = node.iter.as_string() diff --git a/pylint/extensions/private_import.py b/pylint/extensions/private_import.py index 18fb881ae..499c398c6 100644 --- a/pylint/extensions/private_import.py +++ b/pylint/extensions/private_import.py @@ -134,8 +134,8 @@ class PrivateImportChecker(BaseChecker): 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 - in the scope and nested scopes of node and whether these names are only used for type checking. + """Adds to `all_used_type_annotations` all names ever used as a type annotation + in the node's (nested) scopes and whether they are only used as annotation. """ for name in node.locals: # If we find a private type annotation, make sure we do not mask illegal usages @@ -172,8 +172,8 @@ class PrivateImportChecker(BaseChecker): 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 - in the arguments and return type of the function node. + """Adds all names used as type annotation in the arguments and return type of + the function node into the dict `all_used_type_annotations`. """ if node.args and node.args.annotations: for annotation in node.args.annotations: |