From 948b484cc7598d0422f4ad4adeb87ebe6689ca74 Mon Sep 17 00:00:00 2001 From: ooo oo <106524776+ooooo-create@users.noreply.github.com> Date: Sun, 17 Sep 2023 02:36:17 +0800 Subject: [PATCH] [CodeStyle][task 17] enable Ruff F811 rule in `python/paddle/base` (#57398) --- pyproject.toml | 1 - python/paddle/base/dygraph/base.py | 1 - python/paddle/base/io.py | 1 - python/paddle/base/reader.py | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index edc174738481b2..887a30eee08a79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -115,7 +115,6 @@ ignore = [ "PLR1722", "UP028", "C403", - "F811", "UP034", "B011", "C405", diff --git a/python/paddle/base/dygraph/base.py b/python/paddle/base/dygraph/base.py index 6490a6152cef13..ba48d46c2a1c75 100644 --- a/python/paddle/base/dygraph/base.py +++ b/python/paddle/base/dygraph/base.py @@ -25,7 +25,6 @@ import warnings from ..framework import _get_paddle_place import paddle -import warnings __all__ = [ 'no_grad', diff --git a/python/paddle/base/io.py b/python/paddle/base/io.py index 80855333b91654..0eaff581bea281 100644 --- a/python/paddle/base/io.py +++ b/python/paddle/base/io.py @@ -57,7 +57,6 @@ from .reader import * from . import core from paddle.utils import deprecated -from paddle.base.framework import static_only __all__ = reader.__all__ diff --git a/python/paddle/base/reader.py b/python/paddle/base/reader.py index 04dd35fd5a3c04..aab64ba9ce37e0 100644 --- a/python/paddle/base/reader.py +++ b/python/paddle/base/reader.py @@ -46,7 +46,7 @@ ) from .unique_name import UniqueNameGenerator from .framework import _get_paddle_place, _get_paddle_place_list -from paddle.base.framework import _set_expected_place, _current_expected_place +from paddle.base.framework import _set_expected_place import logging import warnings