Skip to content

Commit d8b1970

Browse files
authored
add tests exclusion E402 rule (#73)
1 parent f65e9ab commit d8b1970

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ order-by-type = true
4242
"backend/app/api/v1/*.py" = ["TCH"]
4343
"backend/app/models/*.py" = ["TCH003"]
4444
"backend/app/**/__init__.py" = ["F401"]
45+
"backend/app/tests/*.py" = ["E402"]

backend/app/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# 导入所有模型,并将 Base 放在最前面, 以便 Base 拥有它们
55
# imported by Alembic
66
"""
7-
from backend.app.database.base_class import MappedBase # F401
7+
from backend.app.database.base_class import MappedBase
88
from backend.app.models.sys_api import Api
99
from backend.app.models.sys_casbin_rule import CasbinRule
1010
from backend.app.models.sys_dept import Dept

0 commit comments

Comments
 (0)