Skip to content

Commit 723ceed

Browse files
authored
[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 0ca4d52. * update deprecated typing
1 parent 29eec2d commit 723ceed

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

python/paddle/jit/api.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@
1616
# Temporary disable isort to avoid circular import
1717
# This can be removed after the circular import is resolved
1818
# isort: skip_file
19+
from __future__ import annotations
20+
1921
import os
2022
import pickle
2123
import warnings
2224
from collections import OrderedDict
2325
import inspect
2426
import threading
25-
from typing import Text, Tuple, Any, List
27+
from typing import Any
2628

2729
import paddle
2830
from paddle.fluid import core, dygraph
@@ -705,12 +707,12 @@ def wrapper(layer, path, input_spec=None, **configs):
705707
return wrapper
706708

707709

708-
def _save_property(filename: Text, property_vals: List[Tuple[Any, Text]]):
710+
def _save_property(filename: str, property_vals: list[tuple[Any, str]]):
709711
"""class property serialization.
710712
711713
Args:
712-
filename (Text): *.meta
713-
property_vals (List[Tuple): class property.
714+
filename (str): *.meta
715+
property_vals (list[tuple[Any, str]]): class property.
714716
"""
715717

716718
def set_property(meta, key, val):

0 commit comments

Comments
 (0)