You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While doing some research about Python's types, I came upon this PR.
I noticed that there are still some leftover orphaned Type Params in some files, such as: _Ts = TypeVarTuple("_Ts")
zha/async_.py: Orphaned Type Params aka dead code is not automatically detected by Python.
I would be happy to open a PR and clean up any more instances I find using a tool to detect them. The change is relatively straight-forward.
Opened #1014 to remove the orphaned type variables: _Ts in zha/async_.py, _R in zha/application/gateway.py and _T / _R / _P in zha/application/helpers.py, plus their now-unused imports. The other TypeVars in the package are all referenced.
ruff, mypy and the gateway / async / helpers tests pass.
If the reporter still wants to take this on, they are welcome to build on or replace #1014.
Activity
pjljvandelaar commentedon Nov 12, 2026
@FrancescoPezzella Can you pick up this
Task?zigpy-review-bot commentedon Nov 12, 2026
Opened #1014 to remove the orphaned type variables:
_Tsinzha/async_.py,_Rinzha/application/gateway.pyand_T/_R/_Pinzha/application/helpers.py, plus their now-unused imports. The other TypeVars in the package are all referenced.ruff, mypy and the gateway / async / helpers tests pass.
If the reporter still wants to take this on, they are welcome to build on or replace #1014.