94 lines
4.8 KiB
TOML
94 lines
4.8 KiB
TOML
[project]
|
|
name = "e"
|
|
version = "0.1.0"
|
|
description = "Embeds for sites with bad or missing embeds, such as Reddit and Twitter."
|
|
readme = "README.md"
|
|
authors = [{ name = "Joakim Hellsén", email = "tlovinator@gmail.com" }]
|
|
requires-python = ">=3.14"
|
|
dependencies = [
|
|
"litestar>=2.24.0",
|
|
"loguru>=0.7.3",
|
|
"pydantic>=2.13.4",
|
|
"uvicorn>=0.52.1",
|
|
"wreq>=0.12.1",
|
|
]
|
|
|
|
[project.scripts]
|
|
e = "e:main"
|
|
|
|
[build-system]
|
|
requires = ["uv_build>=0.12.3,<0.13.0"]
|
|
build-backend = "uv_build"
|
|
|
|
|
|
[tool.ruff]
|
|
fix = true
|
|
preview = true
|
|
unsafe-fixes = true
|
|
line-length = 120
|
|
|
|
format.docstring-code-format = true
|
|
format.preview = true
|
|
|
|
lint.future-annotations = true
|
|
lint.isort.force-single-line = true
|
|
lint.pycodestyle.ignore-overlong-task-comments = true
|
|
lint.pydocstyle.convention = "google"
|
|
lint.select = ["ALL"]
|
|
|
|
# Don't automatically remove unused variables
|
|
lint.unfixable = ["unused-variable"]
|
|
|
|
lint.ignore = [
|
|
"missing-type-args", # Checks that function *args arguments have type annotations.
|
|
"missing-type-kwargs", # Checks that function **kwargs arguments have type annotations.
|
|
"complex-structure", # Checks for functions with a high McCabe complexity.
|
|
"missing-copyright-notice", # Checks for the absence of copyright notices within Python files.
|
|
"undocumented-public-module", # Checks for undocumented public module definitions.
|
|
"undocumented-public-package", # Checks for undocumented public package definitions.
|
|
"undocumented-magic-method", # Checks for undocumented magic method definitions.
|
|
"undocumented-public-nested-class", # Checks for undocumented public class definitions, for nested classes.
|
|
"line-too-long", # Checks for lines that exceed the specified maximum character length.
|
|
"commented-out-code", # Checks for commented-out Python code.
|
|
"line-contains-todo", # Checks for "TODO" comments.
|
|
"too-many-return-statements", # Checks for functions or methods with too many return statements.
|
|
"too-many-branches", # Checks for functions or methods with too many branches, including (nested) if, elif, and else branches, for loops, try-except clauses, and match and case statements.
|
|
"no-self-use", # Checks for the presence of unused self parameter in methods definitions.
|
|
"mutable-class-default", # Checks for mutable default values in class attributes.
|
|
"unused-function-argument", # Checks for the presence of unused arguments in function definitions.
|
|
|
|
# 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/**" = [
|
|
"ARG",
|
|
"undocumented-public-method",
|
|
"FBT",
|
|
"too-many-public-methods",
|
|
"magic-value-comparison",
|
|
"no-self-use",
|
|
"assert",
|
|
"hardcoded-password-string",
|
|
"hardcoded-password-func-arg",
|
|
"suspicious-non-cryptographic-random-usage",
|
|
"private-member-access",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = ["pytest>=9.1.1"]
|