-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongtopic-pep-702PEP 702, @deprecatedPEP 702, @deprecated
Description
Bug Report
Relates to #18474
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=0a111ec53847f83b14902de3a7aec37b
This code does not produce a deprecated error:
# mypy: enable-error-code = deprecated
from typing import overload
from typing_extensions import deprecated
class Some:
@overload
@deprecated("reason")
def __init__(self, x: str) -> None: ...
@overload
def __init__(self, x: int) -> None: ...
def __init__(self, x: int | str) -> None:
pass
Some('test')
Some(1)
Expected Behavior
A deprecated error
Actual Behavior
No error
Your Environment
- Mypy version used: 1.17.0
- Python version used: 3.12
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-pep-702PEP 702, @deprecatedPEP 702, @deprecated