refactor(typing): drop __future__.annotations on Python 3.14 and enable strict pyright
- Set requires-python = ">=3.14" in pyproject.toml to match the Nix Python 3.14 runtime and PEP 649 native deferred annotation semantics - Remove redundant from __future__ import annotations across src/lg_smtv_mcp/ and tests/test_config.py - Add ruff TID251 rule banning __future__.annotations in package and test modules (ignoring docs/poc/*) - Switch pyright typeCheckingMode from basic to strict in pyproject.toml
This commit is contained in:
1 parent
a5d69eb37d
commit
7ec752d4ac
6 files changed
+9
-13
No files matched your search
+9
-3
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
name = "lg-smtv-mcp"
|
name = "lg-smtv-mcp"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "MCP server for controlling an LG webOS Smart TV over the local network"
|
description = "MCP server for controlling an LG webOS Smart TV over the local network"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"websockets",
|
"websockets",
|
||||||
"mcp",
|
"mcp",
|
||||||
@@ -29,9 +29,15 @@ line-length = 100
|
|||||||
target-version = "py314"
|
target-version = "py314"
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["E", "F", "I", "UP", "B"]
|
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]
|
[tool.pyright]
|
||||||
include = ["src", "tests"]
|
include = ["src", "tests"]
|
||||||
typeCheckingMode = "standard"
|
typeCheckingMode = "strict"
|
||||||
pythonVersion = "3.14"
|
pythonVersion = "3.14"
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
"""Module entrypoint for `python -m lg_smtv_mcp`."""
|
"""Module entrypoint for `python -m lg_smtv_mcp`."""
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from lg_smtv_mcp.cli import main
|
from lg_smtv_mcp.cli import main
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"""CLI entrypoint stub for lg-smtv-mcp (expanded in Issue #3)."""
|
"""CLI entrypoint stub for lg-smtv-mcp (expanded in Issue #3)."""
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from collections.abc import Sequence
|
from collections.abc import Sequence
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"""Runtime configuration loader and stdlib .env parser."""
|
"""Runtime configuration loader and stdlib .env parser."""
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"""Typed domain error taxonomy for lg-smtv-mcp."""
|
"""Typed domain error taxonomy for lg-smtv-mcp."""
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from enum import StrEnum
|
from enum import StrEnum
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from enum import StrEnum
|
from enum import StrEnum
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user