Skip to content

Commit

Permalink
Merge pull request #8027 from tk0miya/8032_evaluate_signature_in_py39
Browse files Browse the repository at this point in the history
Fix #8023: evaluate_signature() does not work properly in python3.9
  • Loading branch information
tk0miya committed Aug 1, 2020
2 parents 6084c44 + 76e12a5 commit 5e6da19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx/util/inspect.py
Expand Up @@ -499,7 +499,7 @@ def evaluate_signature(sig: inspect.Signature, globalns: Dict = None, localns: D
"""Evaluate unresolved type annotations in a signature object."""
def evaluate_forwardref(ref: ForwardRef, globalns: Dict, localns: Dict) -> Any:
"""Evaluate a forward reference."""
if sys.version_info > (3, 10):
if sys.version_info > (3, 9):
return ref._evaluate(globalns, localns, frozenset())
else:
return ref._evaluate(globalns, localns)
Expand Down

0 comments on commit 5e6da19

Please sign in to comment.