chore: replace flake8 and black with ruff

This commit is contained in:
aserper
2025-12-13 23:48:58 -05:00
parent 6c4ef36aa8
commit 561377d517
9 changed files with 79 additions and 52 deletions

58
pyproject.toml Normal file
View File

@@ -0,0 +1,58 @@
[project]
name = "masto-rss"
version = "0.1.0"
description = "A Mastodon RSS bot"
dependencies = [
"feedparser>=6.0.10",
"Mastodon.py>=1.8.0",
"python-dateutil>=2.8.2",
"requests>=2.31.0",
]
requires-python = ">=3.10"
[tool.ruff]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E", "F", "W", "C90"]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
line-length = 127
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10
target-version = "py310"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10