From 4af294abb8ff4105d4b5327ba0592a1add41608a Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Thu, 13 Jul 2023 08:35:14 -0400 Subject: [PATCH] Fix type annotation TryExcept was removed in astroid 3.0.0a7 --- pylint/checkers/refactoring/refactoring_checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylint/checkers/refactoring/refactoring_checker.py b/pylint/checkers/refactoring/refactoring_checker.py index 088b7c472b..ef5f7c4279 100644 --- a/pylint/checkers/refactoring/refactoring_checker.py +++ b/pylint/checkers/refactoring/refactoring_checker.py @@ -538,7 +538,7 @@ def _is_bool_const(node: nodes.Return | nodes.Assign) -> bool: node.value.value, bool ) - def _is_actual_elif(self, node: nodes.If | nodes.TryExcept) -> bool: + def _is_actual_elif(self, node: nodes.If | nodes.Try) -> bool: """Check if the given node is an actual elif. This is a problem we're having with the builtin ast module,