-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
wishNot on the current roadmap; maybe in the futureNot on the current roadmap; maybe in the future
Description
https://pypi.org/project/backports.strenum/ implements a backport of Python 3.11's enum.StrEnum as backports.strenum.StrEnum. It would be nice if UP035 (deprecated-import) added support for replacing it with the original version when targeting 3.11+.
Note that the package instructions already suggests using:
if sys.version_info >= (3, 11):
from enum import StrEnum
else:
from backports.strenum import StrEnum
But if someone is not using the conditional import, it would be good for UP035 to clean it up.
Tested on ruff v0.1.1 - https://play.ruff.rs/c973b82b-0107-469b-9b10-9196353b8901
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
wishNot on the current roadmap; maybe in the futureNot on the current roadmap; maybe in the future