Adds [tool.ruff] and [tool.ty] config to pyproject.toml with a curated ruff rule set (E, F, W, I, UP, B, C4, SIM, RUF, ASYNC, LOG, G, PIE, RET, PERF, N), pins ruff/ty in requirements-dev.txt, reformats the whole tree with `ruff format`, and fixes the pre-existing lint and type-check debt those tools surfaced so both run clean. Production-code type fixes include: HA's ConfigFlowResult vs. the generic FlowResult in config_flow.py, narrowing BoundEntity.desc to its platform-specific subclass (SelectDesc/NumberDesc/SensorDesc/etc.) via cast() instead of an unchecked annotation, converting HA device_class strings to their proper enum types, a resolve_registry callback typed as `object` instead of `DeviceRegistry | None`, and a couple of other narrow correctness fixes (CA key type validation, an index-out-of-bounds false positive from an empty-tuple fallback, a bool/dict argument swap). Test-file fixes are mechanical: narrowing SamsungEntityDescription to the correct subclass via isinstance()/cast() before accessing subclass-only fields, and asserting Optional write_fn/unit_fn fields are set before calling them.
17 lines
634 B
Plaintext
17 lines
634 B
Plaintext
# Test harness — pulls in home-assistant, pytest, and pytest-socket at the
|
|
# matching versions. pip resolves the newest home-assistant your interpreter
|
|
# supports: Python 3.13 gets 0.13.316 (the floor below), 3.14 gets newer. On
|
|
# 3.12 or older nothing resolves and the whole install fails.
|
|
pytest-homeassistant-custom-component>=0.13.316
|
|
|
|
# Integration runtime deps, needed to import the component under test
|
|
# (also declared in custom_components/localthings/manifest.json).
|
|
smartthings-local>=0.1.0
|
|
cbor2>=5.4.6
|
|
pyOpenSSL>=23.0
|
|
cryptography>=41.0
|
|
|
|
# Lint / format / type-check tooling, pinned to match CI.
|
|
ruff==0.16.1
|
|
ty==0.0.65
|