File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,10 @@ class FinalClass:
7171 return getattr (FinalClass , "__final__" , False ) # __final__ available in stdlib from python 3.11
7272
7373
74+ fallback_final = final
7475stdlib_final = typing_extensions_import ("final" )
7576if stdlib_final and is_compatible_final (stdlib_final ) and "SPHINX_BUILD" not in os .environ :
76- final = stdlib_final # noqa: F811
77+ final = stdlib_final
7778
7879
7980def import_typeshed_client ():
Original file line number Diff line number Diff line change 88from jsonargparse ._optionals import (
99 _get_config_read_mode ,
1010 docstring_parser_support ,
11- final ,
11+ fallback_final ,
1212 fsspec_support ,
1313 get_docstring_parse_options ,
1414 import_docstring_parser ,
@@ -185,7 +185,7 @@ def test_config_read_mode_fsspec_support_false():
185185# final decorator tests
186186
187187
188- @final
188+ @fallback_final
189189class FinalClass :
190190 pass
191191
You can’t perform that action at this time.
0 commit comments