mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Improve repr for TypeAliasForwardRef
This commit is contained in:
@@ -94,11 +94,11 @@ def _decorator(f):
|
||||
def test_TypeAliasForwardRef():
|
||||
alias = TypeAliasForwardRef('example')
|
||||
sig_str = stringify_annotation(alias, 'fully-qualified-except-typing')
|
||||
assert sig_str == 'example'
|
||||
assert sig_str == "TypeAliasForwardRef('example')"
|
||||
|
||||
alias = Optional[alias] # NoQA: UP007
|
||||
sig_str = stringify_annotation(alias, 'fully-qualified-except-typing')
|
||||
assert sig_str == 'example | None'
|
||||
assert sig_str == "TypeAliasForwardRef('example') | None"
|
||||
|
||||
|
||||
def test_TypeAliasNamespace():
|
||||
|
||||
Reference in New Issue
Block a user