Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jan 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions python/paddle/jit/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -705,12 +707,12 @@ def wrapper(layer, path, input_spec=None, **configs):
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):
Expand Down