Skip to content

Commit

Permalink
🔧 调整 ruff 配置,删除不必要的 select
Browse files Browse the repository at this point in the history
  • Loading branch information
djkcyl committed Jan 3, 2025
1 parent 2ee141c commit 73a84ff
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ select = [
'ARG', # flake8-unused-arguments: 未使用的参数
'ASYNC', # flake8-async: 异步相关
'B', # flake8-bugbear: 常见错误
'BLE', # flake8-blind-except: 盲目捕获异常
'C4', # flake8-comprehensions: 推导式相关
'COM', # flake8-commas: 逗号相关
'DJ', # flake8-django: Django 相关
Expand All @@ -63,7 +62,6 @@ select = [
'FIX', # flake8-fixme: FIXME 注释
'G', # flake8-logging-format: 日志格式
'ICN', # flake8-import-conventions: 导入约定
'INP', # flake8-no-pep420: 缺少 __init__.py
'INT', # flake8-gettext: 国际化相关
'ISC', # flake8-implicit-str-concat: 隐式字符串连接
'LOG', # flake8-logging: 日志相关
Expand All @@ -74,7 +72,6 @@ select = [
'Q', # flake8-quotes: 引号使用
'S', # flake8-bandit: 安全性检查
'SIM', # flake8-simplify: 简化代码
'SLF', # flake8-self: self 使用
'SLOT', # flake8-slots: 使用 __slots__
'T10', # flake8-debugger: 调试器相关
'T20', # flake8-print: 打印语句
Expand All @@ -90,9 +87,6 @@ select = [
'SIM', # flake8-simplify: 简化代码
'TRY', # tryceratops: 异常处理

# Documentation and Comments
'ERA', # eradicate: 删除注释代码

# Formatting and Code Style
'FLY', # flynt: 字符串格式化
'N', # pep8-naming: 命名约定
Expand Down Expand Up @@ -142,9 +136,6 @@ ignore = [
# Bugbear
"B008", # 不要在参数默认值中执行函数调用

# Blind Except
"BLE001", # 盲目捕获异常:捕获 Exception

# Complexity
"C901", # 函数过于复杂
"PLR0912", # 分支过多
Expand All @@ -156,19 +147,15 @@ ignore = [
"E501", # 行过长
"N815", # 变量名应为小写

# Documentation and Comments
"ERA001", # 注释掉的代码

# Refactoring and Code Quality
"F841", # 局部变量赋值后未使用
"PLR2004", # 使用了魔法值
"SLF001", # 访问私有成员
"TRY003", # raise 语句不应包含变量
"TRY301", # raise 语句应在 except 块内

# Import Management
"INP001", # 缺少 __init__.py 文件
"ISC001", # 隐式字符串连接
"TC001", # 仅限类型注释的第一方导入

# Performance
"PERF401", # 检查可以用列表推导式替换的 for 循环
Expand All @@ -178,9 +165,6 @@ ignore = [
"S311", # 标准伪随机生成器不适用于安全/加密目的
"S324", # 使用不安全的 MD5 哈希函数
"S501", # 请求禁用证书验证

# toadd
"TC001",
]


Expand Down

0 comments on commit 73a84ff

Please sign in to comment.