Files
lg-smtv-mcp/pyproject.toml
T
kiskaadee 28d3a8cbab feat(config): enforce Pydantic v2 TvConfig validation and raise ConfigError
- Add standalone ConfigError(Exception) in errors.py decoupled from runtime TvError
- Convert TvConfig from dataclass to frozen Pydantic v2 BaseModel with field_validator hooks using PydanticCustomError
- Validate TV_IP and WOL_BROADCAST as IPv4 addresses, PORT in 1..65535, and MAX_VOLUME in 0..100 on both load_config() and direct TvConfig instantiation
- Redirect Pydantic ValidationError to ConfigError in TvConfig.__init__ and raise ConfigError from require_bearer_token/require_mac
- Declare pydantic explicitly in flake.nix runtimeDeps and pyproject.toml dependencies
- Expand tests/test_config.py to cover ConfigError and direct TvConfig validation
2026-11-15 13:20:41 -05:00

45 lines
973 B
TOML

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "lg-smtv-mcp"
version = "0.1.0"
description = "MCP server for controlling an LG webOS Smart TV over the local network"
requires-python = ">=3.14"
dependencies = [
"websockets",
"mcp",
"pydantic",
"asyncssh",
"uvicorn",
]
[project.scripts]
lg-smtv-mcp = "lg_smtv_mcp.cli:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
pythonpath = ["src"]
[tool.ruff]
line-length = 100
target-version = "py314"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "TID"]
[tool.ruff.lint.per-file-ignores]
"docs/poc/*" = ["TID251"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"__future__.annotations".msg = "Python 3.14 evaluates annotations lazily by default (PEP 649); omit from __future__ import annotations."
[tool.pyright]
include = ["src", "tests"]
typeCheckingMode = "strict"
pythonVersion = "3.14"