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:
kiskaadee committed 2026-11-15 12:59:51 -05:00
1 parent a5d69eb37d
commit 7ec752d4ac
6 files changed
+9 -13

No files matched your search

+9 -3
View File
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
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.11"
requires-python = ">=3.14"
dependencies = [
"websockets",
"mcp",
@@ -29,9 +29,15 @@ line-length = 100
target-version = "py314"
[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]
include = ["src", "tests"]
typeCheckingMode = "standard"
typeCheckingMode = "strict"
pythonVersion = "3.14"
-2
View File
@@ -1,7 +1,5 @@
"""Module entrypoint for `python -m lg_smtv_mcp`."""
from __future__ import annotations
from lg_smtv_mcp.cli import main
if __name__ == "__main__":
-2
View File
@@ -1,7 +1,5 @@
"""CLI entrypoint stub for lg-smtv-mcp (expanded in Issue #3)."""
from __future__ import annotations
from collections.abc import Sequence
-2
View File
@@ -1,7 +1,5 @@
"""Runtime configuration loader and stdlib .env parser."""
from __future__ import annotations
import os
from dataclasses import dataclass
from pathlib import Path
-2
View File
@@ -1,7 +1,5 @@
"""Typed domain error taxonomy for lg-smtv-mcp."""
from __future__ import annotations
from enum import StrEnum
-2
View File
@@ -1,5 +1,3 @@
from __future__ import annotations
from enum import StrEnum
from pathlib import Path