diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-08 13:15:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 13:15:40 +0900 |
commit | a163bbe870dc5bc7f3863ead37cd391be81fb0cc (patch) | |
tree | 9721b51a0594b21c4631034de67c502ed5acef13 | |
parent | 3a37919638cdf77949a6cb9010c3ae37d64a2cae (diff) | |
parent | e31189d9707037410fa83475db9688cc7ad04a9a (diff) | |
download | sphinx-git-a163bbe870dc5bc7f3863ead37cd391be81fb0cc.tar.gz |
Merge pull request #8385 from tk0miya/dont_use_object_to_annotation
test: do not use "object" for the type annotation
-rw-r--r-- | tests/roots/test-ext-autodoc/target/typehints.py | 4 | ||||
-rw-r--r-- | tests/test_ext_autodoc_configs.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/roots/test-ext-autodoc/target/typehints.py b/tests/roots/test-ext-autodoc/target/typehints.py index 1a70eca67..2c9039650 100644 --- a/tests/roots/test-ext-autodoc/target/typehints.py +++ b/tests/roots/test-ext-autodoc/target/typehints.py @@ -1,4 +1,4 @@ -from typing import Tuple, Union +from typing import Any, Tuple, Union def incr(a: int, b: int = 1) -> int: @@ -11,7 +11,7 @@ def decr(a, b = 1): class Math: - def __init__(self, s: str, o: object = None) -> None: + def __init__(self, s: str, o: Any = None) -> None: pass def incr(self, a: int, b: int = 1) -> int: diff --git a/tests/test_ext_autodoc_configs.py b/tests/test_ext_autodoc_configs.py index 8ebe12d40..a0eba20c8 100644 --- a/tests/test_ext_autodoc_configs.py +++ b/tests/test_ext_autodoc_configs.py @@ -490,7 +490,7 @@ def test_autodoc_typehints_signature(app): '.. py:module:: target.typehints', '', '', - '.. py:class:: Math(s: str, o: object = None)', + '.. py:class:: Math(s: str, o: Any = None)', ' :module: target.typehints', '', '', |