-
Notifications
You must be signed in to change notification settings - Fork 2k
A004 Preview Mode ExceptionGroup import in pre-3.11 #13037
Copy link
Copy link
Closed
Labels
acceptedReady for implementationReady for implementationpreviewRelated to preview mode featuresRelated to preview mode featuresruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Getting A004 Import BaseExceptionGroup is shadowing a Python builtin and ExceptionGroup errors raised in this case:
if sys.version_info < (3, 11):
from exceptiongroup import BaseExceptionGroup, ExceptionGroupI would argue that this should not be the case. BaseExceptionGroup and ExceptionGroup do not exist in python versions prior to 3.11, and using the exceptiongroup package is commonly used for backwards compatibility.
Using ruff preview mode v0.6.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acceptedReady for implementationReady for implementationpreviewRelated to preview mode featuresRelated to preview mode featuresruleImplementing or modifying a lint ruleImplementing or modifying a lint rule