@@ -29,21 +29,18 @@ python = "^3.8.1"
29
29
taskiq = " ^0"
30
30
redis = " ^5"
31
31
32
- [tool .poetry .dev- dependencies ]
32
+ [tool .poetry .group . dev . dependencies ]
33
33
pytest = " ^7.0"
34
- flake8 = " ^6"
35
34
mypy = " ^1"
36
- isort = " ^5.10.1"
37
- yesqa = " ^1.3.0"
38
- wemake-python-styleguide = " ^0.18"
39
35
black = " ^22.3.0"
40
- autoflake = " ^1.4"
41
36
pytest-cov = " ^3.0.0"
42
37
anyio = " ^3.6.1"
43
38
pytest-env = " ^0.6.2"
44
39
fakeredis = " ^2"
45
40
pre-commit = " ^2.20.0"
46
41
pytest-xdist = { version = " ^2.5.0" , extras = [" psutil" ] }
42
+ ruff = " ^0.1.0"
43
+ types-redis = " ^4.6.0.7"
47
44
48
45
[tool .mypy ]
49
46
strict = true
@@ -61,10 +58,73 @@ module = ['redis']
61
58
ignore_missing_imports = true
62
59
strict = false
63
60
64
- [tool .isort ]
65
- profile = " black"
66
- multi_line_output = 3
67
-
68
61
[build-system ]
69
62
requires = [" poetry-core>=1.0.0" ]
70
63
build-backend = " poetry.core.masonry.api"
64
+
65
+ [tool .ruff ]
66
+ # List of enabled rulsets.
67
+ # See https://docs.astral.sh/ruff/rules/ for more information.
68
+ select = [
69
+ " E" , # Error
70
+ " F" , # Pyflakes
71
+ " W" , # Pycodestyle
72
+ " C90" , # McCabe complexity
73
+ " I" , # Isort
74
+ " N" , # pep8-naming
75
+ " D" , # Pydocstyle
76
+ " ANN" , # Pytype annotations
77
+ " S" , # Bandit
78
+ " B" , # Bugbear
79
+ " COM" , # Commas
80
+ " C4" , # Comprehensions
81
+ " ISC" , # Implicit string concat
82
+ " PIE" , # Unnecessary code
83
+ " T20" , # Catch prints
84
+ " PYI" , # validate pyi files
85
+ " Q" , # Checks for quotes
86
+ " RSE" , # Checks raise statements
87
+ " RET" , # Checks return statements
88
+ " SLF" , # Self checks
89
+ " SIM" , # Simplificator
90
+ " PTH" , # Pathlib checks
91
+ " ERA" , # Checks for commented out code
92
+ " PL" , # PyLint checks
93
+ " RUF" , # Specific to Ruff checks
94
+ ]
95
+ ignore = [
96
+ " D105" , # Missing docstring in magic method
97
+ " D107" , # Missing docstring in __init__
98
+ " D212" , # Multi-line docstring summary should start at the first line
99
+ " D401" , # First line should be in imperative mood
100
+ " D104" , # Missing docstring in public package
101
+ " D100" , # Missing docstring in public module
102
+ " ANN102" , # Missing type annotation for self in method
103
+ " ANN101" , # Missing type annotation for argument
104
+ " ANN401" , # typing.Any are disallowed in `**kwargs
105
+ " PLR0913" , # Too many arguments for function call
106
+ " D106" , # Missing docstring in public nested class
107
+ ]
108
+ exclude = [" .venv/" ]
109
+ mccabe = { max-complexity = 10 }
110
+ line-length = 88
111
+
112
+ [tool .ruff .per-file-ignores ]
113
+ "tests/*" = [
114
+ " S101" , # Use of assert detected
115
+ " S301" , # Use of pickle detected
116
+ " D103" , # Missing docstring in public function
117
+ " SLF001" , # Private member accessed
118
+ " S311" , # Standard pseudo-random generators are not suitable for security/cryptographic purposes
119
+ " D101" , # Missing docstring in public class
120
+ ]
121
+
122
+ [tool .ruff .pydocstyle ]
123
+ convention = " pep257"
124
+ ignore-decorators = [" typing.overload" ]
125
+
126
+ [tool .ruff .pylint ]
127
+ allow-magic-value-types = [" int" , " str" , " float" , " tuple" ]
128
+
129
+ [tool .ruff .flake8-bugbear ]
130
+ extend-immutable-calls = [" taskiq_dependencies.Depends" , " taskiq.TaskiqDepends" ]
0 commit comments