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 @@ -536,3 +536,8 @@ def test_load_decorated_function():
536
536
assert child .category == "function"
537
537
assert child .parent is child .root
538
538
assert child .parent .name == "decorated_function"
539
+
540
+ def test_load_final_annotations ():
541
+ """Load things annotated as final."""
542
+ loader = Loader (new_path_syntax = True )
543
+ obj = loader .get_object_documentation ("tests.fixtures.final" )
You can’t perform that action at this time.
0 commit comments