diff --git a/astroid/inference.py b/astroid/inference.py index d22030044f..cd66a91709 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -537,9 +537,9 @@ def _infer_unaryop(self, context=None): yield operand else: yield result - except AttributeInferenceError as exc: + except AttributeInferenceError as inner_exc: # The unary operation special method was not found. - yield util.BadUnaryOperationMessage(operand, self.op, exc) + yield util.BadUnaryOperationMessage(operand, self.op, inner_exc) except InferenceError: yield util.Uninferable diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 46ed1c3856..7182bcc34c 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -1386,7 +1386,6 @@ def __init__( frame = parent.frame(future=True) frame.set_local(name, self) - # pylint: disable=arguments-differ; different than Lambdas def postinit( self, args: Arguments, @@ -1490,9 +1489,7 @@ def extra_decorators(self) -> List[node_classes.Call]: return decorators @cached_property - def type( - self, - ): # pylint: disable=invalid-overridden-method,too-many-return-statements + def type(self): # pylint: disable=too-many-return-statements """The function type for this node. Possible values are: method, function, staticmethod, classmethod. diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py index ac8e4a255c..cdadfd65bc 100644 --- a/astroid/rebuilder.py +++ b/astroid/rebuilder.py @@ -1338,7 +1338,6 @@ def visit_attribute( parent=parent, ) elif context == Context.Store: - # pylint: disable=redefined-variable-type newnode = nodes.AssignAttr( attrname=node.attr, lineno=node.lineno, @@ -1572,7 +1571,6 @@ def visit_name( parent=parent, ) elif context == Context.Store: - # pylint: disable=redefined-variable-type newnode = nodes.AssignName( name=node.id, lineno=node.lineno, diff --git a/requirements_test.txt b/requirements_test.txt index 135675383d..aba88cdc96 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,5 +1,6 @@ -r requirements_test_min.txt -r requirements_test_pre_commit.txt +contributors-txt>=0.7.4 coveralls~=3.3 coverage~=5.5 pre-commit~=2.17 diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index 62ec9f2ced..537ab2b412 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -1,5 +1,5 @@ black==22.1.0 -pylint==2.12.2 +pylint~=2.13.0 isort==5.10.1 flake8==4.0.1 flake8-typing-imports==1.12.0 diff --git a/tbump.toml b/tbump.toml index ce6cb97641..72775ee6c7 100644 --- a/tbump.toml +++ b/tbump.toml @@ -28,11 +28,6 @@ src = "astroid/__pkginfo__.py" name = "Upgrade changelog changelog" cmd = "python3 script/bump_changelog.py {new_version}" -[[before_commit]] -# We only need this during tbump, it's not compatible with python < 3.7 -name = "Install dependencie for contributors.txt's update." -cmd = "pip install 'contributors-txt>=0.7.3'" - [[before_commit]] name = "Normalize the contributors-txt configuration" cmd = "contributors-txt-normalize-configuration -a script/.contributors_aliases.json -o script/.contributors_aliases.json"