@@ -47,19 +47,15 @@ pytz = "*"
4747
4848[tool .poetry .dev-dependencies ]
4949pytest = " ^7.1.2"
50+ ruff = " ^0.0.291"
5051black = { version = " ^22.6.0" , allow-prereleases = true }
51- flake8 = " ^6"
52- isort = " ^5.10.1"
5352mypy = " ^1"
5453pre-commit = " ^2.20.0"
55- yesqa = " ^1.3.0"
56- autoflake = " ^1.4"
5754coverage = " ^6.4.2"
5855pytest-cov = " ^3.0.0"
5956mock = " ^4.0.3"
6057pytest-xdist = { version = " ^2.5.0" , extras = [" psutil" ] }
6158types-mock = " ^4.0.15"
62- wemake-python-styleguide = " ^0.18.0"
6359tox = " ^4.6.4"
6460freezegun = " ^1.2.2"
6561pytest-mock = " ^3.11.1"
@@ -96,7 +92,7 @@ profile = "black"
9692multi_line_output = 3
9793
9894[tool .pytest .ini_options ]
99- log_level = ' INFO'
95+ log_level = ' INFO'
10096
10197[tool .coverage .run ]
10298omit = [
@@ -113,3 +109,73 @@ omit = [
113109[build-system ]
114110requires = [" poetry-core>=1.0.0" ]
115111build-backend = " poetry.core.masonry.api"
112+
113+ [tool .ruff ]
114+ # List of enabled rulsets.
115+ # See https://docs.astral.sh/ruff/rules/ for more information.
116+ select = [
117+ " E" , # Error
118+ " F" , # Pyflakes
119+ " W" , # Pycodestyle
120+ " C90" , # McCabe complexity
121+ " I" , # Isort
122+ " N" , # pep8-naming
123+ " D" , # Pydocstyle
124+ " ANN" , # Pytype annotations
125+ " S" , # Bandit
126+ " B" , # Bugbear
127+ " COM" , # Commas
128+ " C4" , # Comprehensions
129+ " ISC" , # Implicit string concat
130+ " PIE" , # Unnecessary code
131+ " T20" , # Catch prints
132+ " PYI" , # validate pyi files
133+ " Q" , # Checks for quotes
134+ " RSE" , # Checks raise statements
135+ " RET" , # Checks return statements
136+ " SLF" , # Self checks
137+ " SIM" , # Simplificator
138+ " PTH" , # Pathlib checks
139+ " ERA" , # Checks for commented out code
140+ " PL" , # PyLint checks
141+ " RUF" , # Specific to Ruff checks
142+ ]
143+ ignore = [
144+ " D105" , # Missing docstring in magic method
145+ " D107" , # Missing docstring in __init__
146+ " D212" , # Multi-line docstring summary should start at the first line
147+ " D401" , # First line should be in imperative mood
148+ " D104" , # Missing docstring in public package
149+ " D100" , # Missing docstring in public module
150+ " ANN102" , # Missing type annotation for self in method
151+ " ANN101" , # Missing type annotation for argument
152+ " ANN401" , # typing.Any are disallowed in `**kwargs
153+ " PLR0913" , # Too many arguments for function call
154+ " D106" , # Missing docstring in public nested class
155+ ]
156+ exclude = [" .venv/" ]
157+ mccabe = { max-complexity = 10 }
158+ line-length = 88
159+
160+ [tool .ruff .per-file-ignores ]
161+ "tests/*" = [
162+ " S101" , # Use of assert detected
163+ " S301" , # Use of pickle detected
164+ " D103" , # Missing docstring in public function
165+ " SLF001" , # Private member accessed
166+ " S311" , # Standard pseudo-random generators are not suitable for security/cryptographic purposes
167+ " D101" , # Missing docstring in public class
168+ ]
169+
170+ [tool .ruff .pydocstyle ]
171+ convention = " pep257"
172+ ignore-decorators = [" typing.overload" ]
173+
174+ [tool .ruff .pylint ]
175+ allow-magic-value-types = [" int" , " str" , " float" , " tuple" ]
176+
177+ [tool .ruff .flake8-bugbear ]
178+ extend-immutable-calls = [
179+ " taskiq_dependencies.Depends" ,
180+ " taskiq.TaskiqDepends" ,
181+ ]
0 commit comments