summaryrefslogtreecommitdiff
path: root/pylint/extensions
diff options
context:
space:
mode:
authorOllie <46904826+ollie-iterators@users.noreply.github.com>2023-02-25 16:12:29 -0500
committerGitHub <noreply@github.com>2023-02-25 22:12:29 +0100
commit02030cf52dbbed3a8bb7c14c4d6158427635cee5 (patch)
tree5c1006b9695be3a05870070c30f55784172e068a /pylint/extensions
parentc785e3edb82683e50d5d370c1c4e992ebda036a0 (diff)
downloadpylint-git-02030cf52dbbed3a8bb7c14c4d6158427635cee5.tar.gz
Fixing some too long lines (#8339)
* Changing flake8 max-line-length to 120 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'pylint/extensions')
-rw-r--r--pylint/extensions/confusing_elif.py3
-rw-r--r--pylint/extensions/private_import.py9
2 files changed, 8 insertions, 4 deletions
diff --git a/pylint/extensions/confusing_elif.py b/pylint/extensions/confusing_elif.py
index 174f464ac..d16d6c60a 100644
--- a/pylint/extensions/confusing_elif.py
+++ b/pylint/extensions/confusing_elif.py
@@ -23,7 +23,8 @@ class ConfusingConsecutiveElifChecker(BaseChecker):
name = "confusing_elif"
msgs = {
"R5601": (
- "Consecutive elif with differing indentation level, consider creating a function to separate the inner elif",
+ "Consecutive elif with differing indentation level, consider creating a function to separate the inner"
+ " elif",
"confusing-consecutive-elif",
"Used when an elif statement follows right after an indented block which itself ends with if or elif. "
"It may not be ovious if the elif statement was willingly or mistakenly unindented. "
diff --git a/pylint/extensions/private_import.py b/pylint/extensions/private_import.py
index fb4458e54..01d800c94 100644
--- a/pylint/extensions/private_import.py
+++ b/pylint/extensions/private_import.py
@@ -64,7 +64,8 @@ class PrivateImportChecker(BaseChecker):
names = [n[0] for n in node.names]
- # Check the imported objects first. If they are all valid type annotations, the package can be private
+ # Check the imported objects first. If they are all valid type annotations,
+ # the package can be private
private_names = self._get_type_annotation_names(node, names)
if not private_names:
return
@@ -139,7 +140,8 @@ class PrivateImportChecker(BaseChecker):
for name in node.locals:
# If we find a private type annotation, make sure we do not mask illegal usages
private_name = None
- # All the assignments using this variable that we might have to check for illegal usages later
+ # All the assignments using this variable that we might have to check for
+ # illegal usages later
name_assignments = []
for usage_node in node.locals[name]:
if isinstance(usage_node, nodes.AssignName) and isinstance(
@@ -205,7 +207,8 @@ class PrivateImportChecker(BaseChecker):
node.value, all_used_type_annotations
)
if isinstance(node, nodes.Attribute):
- # An attribute is a type like `pylint.lint.pylinter`. node.expr is the next level up, could be another attribute
+ # An attribute is a type like `pylint.lint.pylinter`. node.expr is the next level
+ # up, could be another attribute
return self._populate_type_annotations_annotation(
node.expr, all_used_type_annotations
)