Skip to content

Commit

Permalink
Add testDeprecateFunctionAlreadyDecorated.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyralla committed Oct 6, 2024
1 parent 988bf5f commit 80ddc68
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions test-data/unit/fine-grained.test
Original file line number Diff line number Diff line change
Expand Up @@ -10836,3 +10836,36 @@ b.py:1: note: function a.f is deprecated: use f1 instead
main:1: note: function a.f is deprecated: use f1 instead
main:4: note: function a.f is deprecated: use f1 instead
==

[case testDeprecateFunctionAlreadyDecorated]
from b import f
x: str = f()
import b
y: str = b.f()

[file b.py]
from a import f

[file a.py]
from typing import Callable

def d(t: Callable[[], str]) -> Callable[[], str]: ...

@d
def f() -> str: ...

[file a.py.2]
from typing import Callable
from typing_extensions import deprecated

def d(t: Callable[[], str]) -> Callable[[], str]: ...

@deprecated("deprecated decorated function")
@d
def f() -> str: ...

[builtins fixtures/tuple.pyi]
[out]
==
main:2: note: deprecated decorated function
main:4: note: deprecated decorated function

0 comments on commit 80ddc68

Please sign in to comment.