diff --git a/python/paddle/jit/api.py b/python/paddle/jit/api.py index 199667d3cb19239aff34849646104717c35734c0..f55aeb5c1b8cc1cf6719ea9492997c2971971170 100644 --- a/python/paddle/jit/api.py +++ b/python/paddle/jit/api.py @@ -16,13 +16,15 @@ # Temporary disable isort to avoid circular import # This can be removed after the circular import is resolved # isort: skip_file +from __future__ import annotations + import os import pickle import warnings from collections import OrderedDict import inspect import threading -from typing import Text, Tuple, Any, List +from typing import Any import paddle from paddle.fluid import core, dygraph @@ -705,12 +707,12 @@ def _run_save_pre_hooks(func): return wrapper -def _save_property(filename: Text, property_vals: List[Tuple[Any, Text]]): +def _save_property(filename: str, property_vals: list[tuple[Any, str]]): """class property serialization. Args: - filename (Text): *.meta - property_vals (List[Tuple): class property. + filename (str): *.meta + property_vals (list[tuple[Any, str]]): class property. """ def set_property(meta, key, val):