-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Toward #1340.
singledispatch has semantics which don't play nicely with static analysis. Arguably, they're needlessly verbose.
I would prefer to refactor just use if-branch logic.
We should set up a Ruff rule for this, e.g. using example config from docs:
Specific modules or module members that may not be imported or accessed. Note that this rule is only meant to flag accidental uses, and can be circumvented via eval or importlib.
Default value: {}
Type: dict[str, { "msg": str }]
Example usage:
[lint.flake8-tidy-imports.banned-api]
"cgi".msg = "The cgi module is deprecated, see https://peps.python.org/pep-0594/#cgi."
"typing.TypedDict".msg = "Use typing_extensions.TypedDict instead."
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels