forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythonGH-96073: Fix wild replacement in inspect.formatannotation (pyt…
…hon#96074) Co-authored-by: Jelle Zijlstra <[email protected]>
- Loading branch information
Showing
5 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Test ``inspect.formatannotation`` | ||
# https://github.com/python/cpython/issues/96073 | ||
|
||
from typing import Union, List | ||
|
||
ann = Union[List[str], int] | ||
|
||
# mock typing._type_repr behaviour | ||
class A: ... | ||
|
||
A.__module__ = 'testModule.typing' | ||
A.__qualname__ = 'A' | ||
|
||
ann1 = Union[List[A], int] |
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Library/2022-08-29-12-35-28.gh-issue-96073.WaGstf.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
In :mod:`inspect`, fix overeager replacement of "`typing.`" in formatting annotations. |