Files
tensors/pyproject.toml
T
Adam Ladachowski e016c01370 💬 Commit message: Update 2026-02-15 06:14:53, 5 files, 260 lines
📁 Files changed: 5
📝 Lines changed: 260

  • output.png
  • pyproject.toml
  • cli.py
  • comfy.py
  • uv.lock
2026-02-15 06:14:53 +01:00

109 lines
2.3 KiB
TOML

[project]
name = "tensors"
version = "0.1.16"
description = "Read safetensor metadata and fetch CivitAI model information"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"safetensors>=0.4.0",
"httpx>=0.27.0",
"rich>=13.0.0",
"typer>=0.15.0",
"websocket-client>=1.9.0",
]
[project.optional-dependencies]
server = ["fastapi>=0.115", "uvicorn>=0.30"]
[project.scripts]
tsr = "tensors:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["tensors"]
[dependency-groups]
dev = [
"nuitka>=2.0",
"ruff>=0.9.0",
"mypy>=1.14.0",
"pytest>=8.0",
"pytest-cov>=4.1",
"pre-commit>=3.6",
"respx>=0.22.0",
"fastapi>=0.115",
"uvicorn>=0.30",
]
[tool.ruff]
target-version = "py312"
line-length = 130
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"PL", # pylint
"RUF", # ruff-specific
]
ignore = [
"PLR0913", # Too many arguments - CLI commands need many options
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["PLR2004", "ARG002", "TC001", "TC003"]
[tool.ruff.lint.isort]
known-first-party = ["tensors"]
[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
follow_imports = "silent"
ignore_missing_imports = false
[[tool.mypy.overrides]]
module = ["safetensors.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["uvicorn.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --cov=tensors --cov-report=term-missing"
[tool.coverage.run]
source = ["tensors"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]