[project] name = "discord-rss-bot" version = "1.0.0" description = "RSS bot for Discord" readme = "README.md" requires-python = ">=3.12" dependencies = [ "apscheduler>=3.11.0", "fastapi", "httpx2", "jinja2", "lxml", "markdownify", "platformdirs", "playwright", "python-dotenv", "python-multipart", "reader", "sentry-sdk[fastapi]", "tldextract", "uvicorn", ] [dependency-groups] dev = [ "djlint", "identify", "pytest", "pytest-cov", "pytest-randomly", "pytest-xdist", ] [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.ruff] exclude = ["**/README.md"] preview = true unsafe-fixes = true fix = true line-length = 120 lint.select = ["ALL"] # Don't automatically remove unused variables lint.unfixable = ["unused-variable"] lint.pydocstyle.convention = "google" lint.isort.required-imports = ["from __future__ import annotations"] lint.isort.force-single-line = true lint.ignore = [ "missing-return-type-undocumented-public-function", # Checks that public functions and methods have return type annotations. "unused-function-argument", # Checks for the presence of unused arguments in function definitions. "function-call-in-default-argument", # Allow Form() as a default value "missing-copyright-notice", # Missing copyright notice at top of file "undocumented-public-module", # Checks for undocumented public module definitions. "undocumented-public-class", # Checks for undocumented public class definitions. "undocumented-public-method", # Checks for undocumented public method definitions. "undocumented-public-package", # Missing docstring in public package. "undocumented-magic-method", # Missing docstring in magic method. "undocumented-magic-method", # pydocstyle - missing docstring in magic method "undocumented-public-nested-class", # Checks for undocumented public class definitions, for nested classes. "commented-out-code", # Found commented-out code "boolean-positional-value-in-call", # Checks for boolean positional arguments in function calls. "line-contains-todo", # Line contains TODO "logging-percent-format", # Allow % in logging "blanket-type-ignore", # Check for type: ignore annotations that suppress all type warnings, as opposed to targeting specific type warnings. "no-self-use", # Checks for the presence of unused self parameter in methods definitions. "unused-async", # Checks for functions declared async that do not await or otherwise use features requiring the function to be declared async. "missing-todo-link", # Checks that a TODO comment is associated with a link to a relevant issue or ticket. "too-many-arguments", # Checks for function definitions that include too many arguments. "too-many-positional-arguments", # Checks for function definitions that include too many positional arguments. # Conflicting lint rules when using Ruff's formatter # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "missing-trailing-comma", # Checks for the absence of trailing commas. "prohibited-trailing-comma", # Checks for the presence of prohibited trailing commas. "docstring-tab-indentation", # Checks for docstrings that are indented with tabs. "triple-single-quotes", # Checks for docstrings that use '''triple single quotes''' instead of """triple double quotes""". "indentation-with-invalid-multiple", # Checks for indentation with a non-multiple of 4 spaces. "indentation-with-invalid-multiple-comment", # Checks for indentation of comments with a non-multiple of 4 spaces. "over-indented", # Checks for over-indented code. "single-line-implicit-string-concatenation", # Checks for implicitly concatenated strings on a single line. "multi-line-implicit-string-concatenation", # Checks for implicitly concatenated strings that span multiple lines. "bad-quotes-inline-string", # Checks for inline strings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.inline-quotes option. "bad-quotes-multiline-string", # Checks for multiline strings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.multiline-quotes setting. "bad-quotes-docstring", # Checks for docstrings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.docstring-quotes setting. "avoidable-escaped-quote", # Checks for strings that include escaped quotes, and suggests changing the quote style to avoid the need to escape them. "tab-indentation", # Checks for indentation that uses tabs. ] [tool.ruff.lint.per-file-ignores] "tests/*" = ["assert", "undocumented-public-function", "magic-value-comparison", "import-private-name"] [tool.pytest.ini_options] addopts = "-n 5 --dist loadfile -m \"not integration and not slow\"" markers = [ "integration: tests that exercise external integrations or end-to-end flows", "slow: tests that are intentionally slower than the default fast test suite", ] filterwarnings = [ "ignore::bs4.GuessedAtParserWarning", "ignore:functools\\.partial will be a method descriptor in future Python versions; wrap it in staticmethod\\(\\) if you want to preserve the old behavior:FutureWarning", ]