Ivan Schaller
873e6ab0e2
Some checks failed
ci/woodpecker/push/tests Pipeline failed
Signed-off-by: Ivan Schaller <ivan@schaller.sh>
173 lines
3.8 KiB
TOML
173 lines
3.8 KiB
TOML
[build-system]
|
|
requires = ["hatchling>=1.11.0"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
dynamic = ["version"]
|
|
name = "manga-dlp"
|
|
description = "A cli manga downloader"
|
|
readme = "README.md"
|
|
license = "MIT"
|
|
requires-python = ">=3.8"
|
|
authors = [{ name = "Ivan Schaller", email = "ivan@schaller.sh" }]
|
|
keywords = ["manga", "downloader", "mangadex"]
|
|
classifiers = [
|
|
"License :: OSI Approved :: MIT License",
|
|
"Natural Language :: English",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
]
|
|
dependencies = [
|
|
"requests>=2.28.0",
|
|
"loguru>=0.6.0",
|
|
"click>=8.1.3",
|
|
"click-option-group>=0.5.5",
|
|
"xmltodict>=0.13.0",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/olofvndrhr/manga-dlp"
|
|
History = "https://github.com/olofvndrhr/manga-dlp/commits/master"
|
|
Tracker = "https://github.com/olofvndrhr/manga-dlp/issues"
|
|
Source = "https://github.com/olofvndrhr/manga-dlp"
|
|
|
|
[project.scripts]
|
|
mangadlp = "mangadlp.cli:main"
|
|
manga-dlp = "mangadlp.cli:main"
|
|
|
|
[tool.hatch.version]
|
|
path = "mangadlp/__about__.py"
|
|
|
|
[tool.hatch.build]
|
|
ignore-vcs = true
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
packages = ["mangadlp"]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["mangadlp"]
|
|
|
|
[tool.hatch.envs.default]
|
|
dependencies = [
|
|
"requests>=2.28.0",
|
|
"loguru>=0.6.0",
|
|
"click>=8.1.3",
|
|
"click-option-group>=0.5.5",
|
|
"xmltodict>=0.13.0",
|
|
"xmlschema>=2.2.1",
|
|
"img2pdf>=0.4.4",
|
|
"hatch>=1.6.0",
|
|
"hatchling>=1.11.0",
|
|
"pytest>=7.0.0",
|
|
"coverage>=6.3.1",
|
|
"black>=22.1.0",
|
|
"mypy>=0.940",
|
|
"tox>=3.24.5",
|
|
"ruff>=0.0.247",
|
|
]
|
|
|
|
# black
|
|
|
|
[tool.black]
|
|
line-length = 100
|
|
target-version = ["py39"]
|
|
|
|
# pyright
|
|
|
|
[tool.pyright]
|
|
typeCheckingMode = "strict"
|
|
pythonVersion = "3.9"
|
|
reportUnnecessaryTypeIgnoreComment = true
|
|
reportShadowedImports = true
|
|
reportUnusedExpression = true
|
|
reportMatchNotExhaustive = true
|
|
# venvPath = "."
|
|
# venv = "venv"
|
|
|
|
# ruff
|
|
|
|
[tool.ruff]
|
|
target-version = "py39"
|
|
select = [
|
|
"E", # pycodetyle err
|
|
"W", # pycodetyle warn
|
|
"D", # pydocstyle
|
|
"C90", # mccabe
|
|
"I", # isort
|
|
"PLE", # pylint err
|
|
"PLW", # pylint warn
|
|
"PLC", # pylint convention
|
|
"PLR", # pylint refactor
|
|
"F", # pyflakes
|
|
"RUF", # ruff specific
|
|
]
|
|
line-length = 100
|
|
fix = true
|
|
show-fixes = true
|
|
format = "grouped"
|
|
ignore-init-module-imports = true
|
|
respect-gitignore = true
|
|
ignore = ["E501", "D103", "D100", "D102", "PLR2004", "D403"]
|
|
#unfixable = ["F401"]
|
|
exclude = [
|
|
".direnv",
|
|
".git",
|
|
".mypy_cache",
|
|
".ruff_cache",
|
|
".svn",
|
|
".venv",
|
|
"venv",
|
|
"__pypackages__",
|
|
"build",
|
|
"dist",
|
|
"venv",
|
|
]
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
"__init__.py" = ["D104"]
|
|
"__about__.py" = ["D104", "F841"]
|
|
|
|
[tool.ruff.pylint]
|
|
max-args = 10
|
|
|
|
[tool.ruff.mccabe]
|
|
max-complexity = 10
|
|
|
|
[tool.ruff.pydocstyle]
|
|
convention = "google"
|
|
|
|
[tool.ruff.pycodestyle]
|
|
max-doc-length = 100
|
|
|
|
# pytest
|
|
|
|
[tool.pytest.ini_options]
|
|
pythonpath = ["."]
|
|
|
|
# coverage
|
|
|
|
[tool.coverage.run]
|
|
source = ["mangadlp"]
|
|
branch = true
|
|
command_line = "-m pytest --exitfirst"
|
|
|
|
[tool.coverage.report]
|
|
# Regexes for lines to exclude from consideration
|
|
exclude_lines = [
|
|
# Have to re-enable the standard pragma
|
|
"pragma: no cover",
|
|
# Don't complain about missing debug-only code:
|
|
"def __repr__",
|
|
"if self.debug",
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
# Don't complain if non-runnable code isn't run:
|
|
"if 0:",
|
|
"if __name__ == .__main__.:",
|
|
# Don't complain about abstract methods, they aren't run:
|
|
"@(abc.)?abstractmethod",
|
|
]
|
|
ignore_errors = true
|