mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8385 from tk0miya/dont_use_object_to_annotation
test: do not use "object" for the type annotation
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from typing import Tuple, Union
|
from typing import Any, Tuple, Union
|
||||||
|
|
||||||
|
|
||||||
def incr(a: int, b: int = 1) -> int:
|
def incr(a: int, b: int = 1) -> int:
|
||||||
@@ -11,7 +11,7 @@ def decr(a, b = 1):
|
|||||||
|
|
||||||
|
|
||||||
class Math:
|
class Math:
|
||||||
def __init__(self, s: str, o: object = None) -> None:
|
def __init__(self, s: str, o: Any = None) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def incr(self, a: int, b: int = 1) -> int:
|
def incr(self, a: int, b: int = 1) -> int:
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ def test_autodoc_typehints_signature(app):
|
|||||||
'.. py:module:: target.typehints',
|
'.. py:module:: target.typehints',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'.. py:class:: Math(s: str, o: object = None)',
|
'.. py:class:: Math(s: str, o: Any = None)',
|
||||||
' :module: target.typehints',
|
' :module: target.typehints',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
|
|||||||
Reference in New Issue
Block a user