eggplants/locloc

View on GitHub
pyproject.toml

Summary

Maintainability
Test Coverage
[build-system]
build-backend = "poetry.core.masonry.api"
requires = [
  "poetry-core",
]

[tool.poetry]
authors = [
  "eggplants <w10776e8w@yahoo.co.jp>",
]
classifiers = [
  "License :: OSI Approved :: MIT License",
  "Programming Language :: Python",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3 :: Only",
  "Programming Language :: Python :: Implementation :: CPython",
]
description = "Online LOC counter"
keywords = [
  "loc",
  "web",
]
name = "locloc"
packages = [
  { include = "locloc" },
]
license = "MIT"
readme = "README.md"
repository = "https://github.com/eggplants/locloc"
version = "0.0.4"
include = [
  { path = "locloc/static_files", format = [
    "sdist",
    "wheel",
  ] },
  { path = "locloc/templates", format = [
    "sdist",
    "wheel",
  ] },
]

[tool.poetry.dependencies]
python = ">=3.9,<4"
fastapi = ">=0.103.1,<0.112.0"
gitpython = "^3.1.36"
pytokei = "^0.2.0"
pydantic = "^2.3.0"
uvicorn = ">=0.23.2,<0.31.0"
jinja2 = "^3.1.2"
timeout-decorator = "^0.5.0"
pygal = "^3.0.0"
slowapi = { git = "https://github.com/laurentS/slowapi.git" }

[tool.poetry.group.dev.dependencies]
mypy = ">=0.991,<1.11"
pre-commit = ">=2.20,<4.0"
taskipy = "^1.10.3"
pytest = ">=7.2.2,<9.0.0"
pytest-cov = ">=4,<6"

[tool.poetry.scripts]
locloc-server = "locloc.main:main"

[tool.black]
line-length = 120
target-version = [
  'py39',
]

[tool.ruff]
line-length = 120

select = [
  "ALL",
]
ignore = [
  "D",
  "ANN101",
]
mccabe.max-complexity = 18
per-file-ignores."main.py" = [
  "T201", # `print` found
]
per-file-ignores."tests/*test_*.py" = [
  "INP001", # File tests/test_*.py is part of an implicit namespace package. Add an __init__.py.
  "S101",   # Use of assert detected
]

[tool.mypy]
pretty = true
python_version = "3.9"
show_error_codes = true
strict = true

[tool]

[tool.pytype]
python_version = '3.10'
jobs = '4'
report_errors = true
precise_return = true
protocols = true
strict_import = true

[tool.taskipy.tasks]
start = "uvicorn locloc.main:app"
dev = "uvicorn locloc.main:app --reload"
test = "pytest --cov=locloc --cov-report=term"
"test:ci" = "task test --cov-report=xml:cov.xml"
lint = "pre-commit run -a"
profile = "python -m cProfile"