@@ -36,12 +36,14 @@ select = [
36
36
" PERF" , # https://docs.astral.sh/ruff/rules/#perflint-perf
37
37
" RUF" , # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
38
38
39
- # "PL", # https://docs.astral.sh/ruff/rules/#pylint-pl
40
- # "FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
39
+ " PL" , # https://docs.astral.sh/ruff/rules/#pylint-pl
41
40
]
42
41
43
42
ignore = [
44
- " RET501" # https://docs.astral.sh/ruff/rules/unnecessary-return-none/#unnecessary-return-none-ret501
43
+ " A003" , # https://docs.astral.sh/ruff/rules/builtin-attribute-shadowing/
44
+ " RET501" , # https://docs.astral.sh/ruff/rules/unnecessary-return-none/#unnecessary-return-none-ret501
45
+ " TRY400" , # https://docs.astral.sh/ruff/rules/error-instead-of-exception/
46
+ " PLR1711" , # https://docs.astral.sh/ruff/rules/useless-return/
45
47
]
46
48
47
49
@@ -50,15 +52,24 @@ ignore = [
50
52
quote-style = " single"
51
53
52
54
53
- [lint .isort ]
54
- known-local-folder = [" easyconfig" ]
55
- known-first-party = [" tests" , " helper" ]
55
+ [lint .per-file-ignores ]
56
+ "docs/*" = [
57
+ " A001" , # A001 Variable `copyright` is shadowing a Python builtin
58
+ " E402" , # E402 Module level import not at top of file
59
+ " INP001" , # INP001 File `FILE_NAME` is part of an implicit namespace package. Add an `__init__.py`.
60
+ ]
56
61
62
+ "tests/*" = [
63
+ " INP001" , # INP001 File `FILE_NAME` is part of an implicit namespace package. Add an `__init__.py`.
64
+ " ISC002" , # ISC002 Implicitly concatenated string literals over multiple lines
65
+ " PLR2004" , # PLR2004 Magic value used in comparison, consider replacing 5 with a constant variable
66
+ ]
57
67
58
- [ lint . flake8-builtins ]
59
- builtins-ignorelist = [" id " ]
68
+ "setup.py" = [ " PTH123 " ]
69
+ "src/easyconfig/yaml/from_model.py" = [" PLR0911 " ] # PLR0911 Too many return statements (7 > 6)
60
70
61
71
62
- [lint .per-file-ignores ]
63
- "docs/conf.py" = [" INP001" , " A001" ]
64
- "setup.py" = [" PTH123" ]
72
+
73
+ [lint .isort ]
74
+ # https://docs.astral.sh/ruff/settings/#isort-lines-after-imports
75
+ lines-after-imports = 2
0 commit comments