未验证 提交 888b8b6b 编写于 作者: 张春乔 提交者: GitHub

[CodeStyle][PLC0414] remove self-alias and some discussion (#52122)

上级 e7c249cb
......@@ -120,7 +120,7 @@ select = [
# "B904",
# Pylint
# "PLC0414",
"PLC0414",
# "PLC1901",
"PLC3002",
"PLE0100",
......
......@@ -42,7 +42,7 @@ from .fluid.lazy_init import LazyGuard # noqa: F401
from .framework.dtype import iinfo # noqa: F401
from .framework.dtype import finfo # noqa: F401
from .framework.dtype import dtype as dtype # noqa: F401
from .framework.dtype import dtype # noqa: F401
from .framework.dtype import uint8 # noqa: F401
from .framework.dtype import int8 # noqa: F401
from .framework.dtype import int16 # noqa: F401
......
......@@ -19,8 +19,8 @@ from ..fluid.dygraph.base import is_grad_enabled # noqa: F401
from ..fluid.dygraph.base import set_grad_enabled # noqa: F401
from . import backward_mode # noqa: F401
from .backward_mode import backward # noqa: F401
from .py_layer import PyLayer as PyLayer # noqa: F401
from .py_layer import PyLayerContext as PyLayerContext # noqa: F401
from .py_layer import PyLayer # noqa: F401
from .py_layer import PyLayerContext # noqa: F401
from .saved_tensors_hooks import saved_tensors_hooks
__all__ = [ # noqa
......
......@@ -371,9 +371,7 @@ class ParameterServerOptimizer(MetaOptimizerBase):
_origin_main_program = loss.block.program
_origin_startup_program = startup_program
from paddle.incubate.distributed.fleet.parameter_server.ir import (
public as public,
)
from paddle.incubate.distributed.fleet.parameter_server.ir import public
compiled_config = public.CompileTimeStrategy(
_origin_main_program,
......
......@@ -19,7 +19,7 @@ import numpy as np
import paddle
from paddle.distribution.transformed_distribution import TransformedDistribution
from paddle.fluid import framework as framework
from paddle.fluid import framework
class Gumbel(TransformedDistribution):
......
......@@ -18,7 +18,7 @@ import numpy as np
import paddle
from paddle.distribution import distribution
from paddle.fluid import framework as framework
from paddle.fluid import framework
class Laplace(distribution.Distribution):
......
......@@ -445,7 +445,7 @@ class DnnTrainer:
"entering run {} - old".format(str(config["applied_pass_name"]))
)
from paddle.incubate.distributed.fleet.parameter_server.ir import (
public as public,
public,
)
dist_strategy = get_distributed_strategy(user_defined_strategy)
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest as unittest
import unittest
from paddle import fluid
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest as unittest
import unittest
from paddle import fluid
......
......@@ -17,7 +17,7 @@ import typing
from collections import OrderedDict
import paddle
from paddle.fluid import framework as framework
from paddle.fluid import framework
from paddle.fluid.core import prim_config
from paddle.fluid.framework import Operator, default_main_program
from paddle.incubate.autograd.utils import as_tensors
......
......@@ -15,7 +15,7 @@ import typing
import paddle
import paddle.framework.dtype as dtypes
from paddle.fluid import framework as framework
from paddle.fluid import framework
from .phi_ops_map import op_info, op_map
......
......@@ -75,7 +75,7 @@ from paddle.incubate.distributed.fleet.parameter_server.ir import (
pserver_pass as server,
)
from paddle.incubate.distributed.fleet.parameter_server.ir import (
public as public,
public,
)
......
......@@ -1485,7 +1485,7 @@ def main():
else:
env_dict_path = TOP_DIR + "/build/python/"
sys.path.insert(1, env_dict_path)
from env_dict import env_dict as env_dict
from env_dict import env_dict
global env_dict
global paddle_binary_dir, paddle_source_dir
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册