未验证 提交 723ceed9 编写于 作者: N Nyakku Shigure 提交者: GitHub

[CodeStyle][UP019] update deprecated type annotation in `python/paddle/jit/api.py` (#49506)

* [CodeStyle][isort][UP019] sort imports and update deprecated type annotation in paddle/jit/api.py

* Revert "[CodeStyle][isort][UP019] sort imports and update deprecated type annotation in paddle/jit/api.py"

This reverts commit 0ca4d52c900199126e6433057d1514dbf9d4ee07.

* update deprecated typing
上级 29eec2dd
...@@ -16,13 +16,15 @@ ...@@ -16,13 +16,15 @@
# Temporary disable isort to avoid circular import # Temporary disable isort to avoid circular import
# This can be removed after the circular import is resolved # This can be removed after the circular import is resolved
# isort: skip_file # isort: skip_file
from __future__ import annotations
import os import os
import pickle import pickle
import warnings import warnings
from collections import OrderedDict from collections import OrderedDict
import inspect import inspect
import threading import threading
from typing import Text, Tuple, Any, List from typing import Any
import paddle import paddle
from paddle.fluid import core, dygraph from paddle.fluid import core, dygraph
...@@ -705,12 +707,12 @@ def _run_save_pre_hooks(func): ...@@ -705,12 +707,12 @@ def _run_save_pre_hooks(func):
return wrapper 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. """class property serialization.
Args: Args:
filename (Text): *.meta filename (str): *.meta
property_vals (List[Tuple): class property. property_vals (list[tuple[Any, str]]): class property.
""" """
def set_property(meta, key, val): def set_property(meta, key, val):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册