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
All six methods below have None-returning bodies but no -> None annotation. With disallow_untyped_defs = true enabled (#246), mypy will flag all of them.
Line 56 — ServerManager.__init__ (HIGH — public constructor)
Line 259 — _kill_orphan_sidecars (HIGH — called by ensure_server_running)
def_kill_orphan_sidecars(self) ->None:
Already docstring-documented as returning None; annotation is missing.
Line 300 — _kill_old_server (HIGH — called by stop, restart, ensure_server_running)
def_kill_old_server(self) ->None:
Line 397 — _remove_stale_lock (MEDIUM — private utility)
def_remove_stale_lock(self) ->None:
Line 404 — _start_server_via_launcher (HIGH — core of ensure_server_running)
def_start_server_via_launcher(self) ->None:
Line 460 — _wait_for_health (HIGH — core of ensure_server_running)
def_wait_for_health(self) ->None:
Impact
ServerManager.__init__ is the public constructor used directly by users via pmxt.server and by Exchange.__init__ internally. Missing -> None blocks IDE hover documentation.
The five private helpers are all called from ensure_server_running, which is the hot path on every SDK startup. Mypy enables call-site type narrowing only when return types are declared.
File
sdks/python/pmxt/server_manager.pyMissing Return Types
All six methods below have
None-returning bodies but no-> Noneannotation. Withdisallow_untyped_defs = trueenabled (#246), mypy will flag all of them.Line 56 —
ServerManager.__init__(HIGH — public constructor)→ should be
-> NoneLine 259 —
_kill_orphan_sidecars(HIGH — called byensure_server_running)Already docstring-documented as returning None; annotation is missing.
Line 300 —
_kill_old_server(HIGH — called bystop,restart,ensure_server_running)Line 397 —
_remove_stale_lock(MEDIUM — private utility)Line 404 —
_start_server_via_launcher(HIGH — core ofensure_server_running)Line 460 —
_wait_for_health(HIGH — core ofensure_server_running)Impact
ServerManager.__init__is the public constructor used directly by users viapmxt.serverand byExchange.__init__internally. Missing-> Noneblocks IDE hover documentation.ensure_server_running, which is the hot path on every SDK startup. Mypy enables call-site type narrowing only when return types are declared.disallow_untyped_defs = true([python-types] pyproject.toml: disallow_untyped_defs = false allows all type gaps to silently pass #246) will fail CI on all six simultaneously.Suggested Fix
Add
-> Noneto each method:Found by automated Python type hints audit