From 46f35b8053abe52e8327ca841e7d2bfbac7b73e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 May 2020 11:17:50 +0200 Subject: [PATCH] documentation/python: attempt to reproduce a Py3.6-specific typing issue. --- .../inspect_annotations/inspect_annotations.html | 2 ++ .../test_python/inspect_annotations/inspect_annotations.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/documentation/test_python/inspect_annotations/inspect_annotations.html b/documentation/test_python/inspect_annotations/inspect_annotations.html index 50603d27..2b35cca1 100644 --- a/documentation/test_python/inspect_annotations/inspect_annotations.html +++ b/documentation/test_python/inspect_annotations/inspect_annotations.html @@ -41,6 +41,8 @@
class AContainer
A generic class. No parent class info extracted yet.
+
class AContainer2
+
Another class derived from a typing thing.
class Foo
A class with properties
class FooSlots
diff --git a/documentation/test_python/inspect_annotations/inspect_annotations.py b/documentation/test_python/inspect_annotations/inspect_annotations.py index 7ef97fc9..b7e8218b 100644 --- a/documentation/test_python/inspect_annotations/inspect_annotations.py +++ b/documentation/test_python/inspect_annotations/inspect_annotations.py @@ -2,7 +2,7 @@ import sys -from typing import List, Tuple, Dict, Any, Union, Optional, Callable, TypeVar, Generic +from typing import List, Tuple, Dict, Any, Union, Optional, Callable, TypeVar, Generic, Iterator class Foo: """A class with properties""" @@ -21,9 +21,12 @@ class FooSlots: _T = TypeVar('Tp') -# Triggers a corner case with _gorg on Py3.6 +# Triggers a corner case with _gorg on Py3.6 (the member has to be ignored). +# AContainer2 is not derived directly from Generic but has _gorg also. class AContainer(Generic[_T]): """A generic class. No parent class info extracted yet.""" +class AContainer2(Iterator): + """Another class derived from a typing thing.""" def annotation(param: List[int], another: bool, third: str = "hello") -> float: """An annotated function""" -- 2.30.2