Skip to content

Commit d2df047

Browse files
Update pylint to 2.13 (#1488)
Also remove the runtime installation of contributors-txt We can install it on python <3.8 now. Co-authored-by: Pierre Sassoulas <[email protected]>
1 parent 4d79e08 commit d2df047

File tree

6 files changed

+5
-14
lines changed

6 files changed

+5
-14
lines changed

astroid/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ def _infer_unaryop(self, context=None):
537537
yield operand
538538
else:
539539
yield result
540-
except AttributeInferenceError as exc:
540+
except AttributeInferenceError as inner_exc:
541541
# The unary operation special method was not found.
542-
yield util.BadUnaryOperationMessage(operand, self.op, exc)
542+
yield util.BadUnaryOperationMessage(operand, self.op, inner_exc)
543543
except InferenceError:
544544
yield util.Uninferable
545545

astroid/nodes/scoped_nodes/scoped_nodes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,6 @@ def __init__(
13861386
frame = parent.frame(future=True)
13871387
frame.set_local(name, self)
13881388

1389-
# pylint: disable=arguments-differ; different than Lambdas
13901389
def postinit(
13911390
self,
13921391
args: Arguments,
@@ -1490,9 +1489,7 @@ def extra_decorators(self) -> List[node_classes.Call]:
14901489
return decorators
14911490

14921491
@cached_property
1493-
def type(
1494-
self,
1495-
): # pylint: disable=invalid-overridden-method,too-many-return-statements
1492+
def type(self): # pylint: disable=too-many-return-statements
14961493
"""The function type for this node.
14971494
14981495
Possible values are: method, function, staticmethod, classmethod.

astroid/rebuilder.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,6 @@ def visit_attribute(
13381338
parent=parent,
13391339
)
13401340
elif context == Context.Store:
1341-
# pylint: disable=redefined-variable-type
13421341
newnode = nodes.AssignAttr(
13431342
attrname=node.attr,
13441343
lineno=node.lineno,
@@ -1572,7 +1571,6 @@ def visit_name(
15721571
parent=parent,
15731572
)
15741573
elif context == Context.Store:
1575-
# pylint: disable=redefined-variable-type
15761574
newnode = nodes.AssignName(
15771575
name=node.id,
15781576
lineno=node.lineno,

requirements_test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
-r requirements_test_min.txt
22
-r requirements_test_pre_commit.txt
3+
contributors-txt>=0.7.4
34
coveralls~=3.3
45
coverage~=5.5
56
pre-commit~=2.17

requirements_test_pre_commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
black==22.1.0
2-
pylint==2.12.2
2+
pylint~=2.13.0
33
isort==5.10.1
44
flake8==4.0.1
55
flake8-typing-imports==1.12.0

tbump.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ src = "astroid/__pkginfo__.py"
2828
name = "Upgrade changelog changelog"
2929
cmd = "python3 script/bump_changelog.py {new_version}"
3030

31-
[[before_commit]]
32-
# We only need this during tbump, it's not compatible with python < 3.7
33-
name = "Install dependencie for contributors.txt's update."
34-
cmd = "pip install 'contributors-txt>=0.7.3'"
35-
3631
[[before_commit]]
3732
name = "Normalize the contributors-txt configuration"
3833
cmd = "contributors-txt-normalize-configuration -a script/.contributors_aliases.json -o script/.contributors_aliases.json"

0 commit comments

Comments
 (0)