From 13c2342afed7c187bffe8ed2b002a7b9fbdc3107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=98=A5=E4=B9=94?= <83450930+Liyulingyue@users.noreply.github.com> Date: Tue, 4 Jul 2023 09:34:30 +0800 Subject: [PATCH] [CodeStyle][CINN] ruff F821,F901 in test/cinn (#55103) --- pyproject.toml | 2 -- test/cinn/test_paddle_model_convertor.py | 6 +++++- test/cinn/test_utils.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3721ffed727..810c5d9f64e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,8 +107,6 @@ ignore = [ "F403", "F632", "F811", - "F821", - "F901", "C408", "C417", "PLR0402", diff --git a/test/cinn/test_paddle_model_convertor.py b/test/cinn/test_paddle_model_convertor.py index 8d8313807a2..699bb0dc093 100644 --- a/test/cinn/test_paddle_model_convertor.py +++ b/test/cinn/test_paddle_model_convertor.py @@ -21,7 +21,11 @@ import sys import unittest import numpy as np -from cinn.common import DefaultNVGPUTarget, is_compiled_with_cuda +from cinn.common import ( + DefaultHostTarget, + DefaultNVGPUTarget, + is_compiled_with_cuda, +) from cinn.frontend import PaddleModelConvertor from cinn.runtime import seed as cinn_seed from op_mappers.op_mapper_test import OpMapperTest diff --git a/test/cinn/test_utils.py b/test/cinn/test_utils.py index 45dd9ae6299..e1a999d40df 100755 --- a/test/cinn/test_utils.py +++ b/test/cinn/test_utils.py @@ -43,7 +43,7 @@ class SingleOpTester(unittest.TestCase): ''' create the target of the operator's execution output. ''' - raise NotImplemented + raise NotImplementedError def test_op(self): ''' -- GitLab