File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 5
5
iterating over their members, etc.
6
6
"""
7
7
8
+ from __future__ import annotations
9
+
8
10
import importlib
9
11
import inspect
10
12
import pkgutil
Original file line number Diff line number Diff line change
1
+ # from __future__ import annotations
2
+
3
+ from typing import Final , get_type_hints
4
+
5
+ name : Final [str ] = "final"
6
+
7
+ class Class :
8
+ value : Final = 3000
9
+
10
+ # get_type_hints(Class)
Original file line number Diff line number Diff line change @@ -545,3 +545,8 @@ def test_load_decorated_function():
545
545
assert child .category == "function"
546
546
assert child .parent is child .root
547
547
assert child .parent .name == "decorated_function"
548
+
549
+ def test_load_final_annotations ():
550
+ """Load things annotated as final."""
551
+ loader = Loader (new_path_syntax = True )
552
+ obj = loader .get_object_documentation ("tests.fixtures.final" )
You can’t perform that action at this time.
0 commit comments