File
sdks/python/pmxt/__init__.py
Missing Return Types
- Line 89:
def status(self): on _ServerNamespace → should be -> Dict[str, Any]
- Delegates to
ServerManager.status() which is correctly typed as -> Dict[str, Any]
- Line 104:
def logs(self, n: int = 50): on _ServerNamespace → should be -> List[str]
- Delegates to
ServerManager.logs() which is correctly typed as -> list
Impact
pmxt.server.status() and pmxt.server.logs() are the primary user-facing server management methods. Without return type annotations users get:
- No IDE autocompletion on the returned dict keys from
status()
- No static analysis on the result of
logs()
These are wrapper methods — the underlying ServerManager already carries correct types, so the fix is a one-line annotation per method.
Suggested Fix
def status(self) -> Dict[str, Any]:
return self._manager.status()
def logs(self, n: int = 50) -> List[str]:
return self._manager.logs(n)
Found by automated Python type hints audit
File
sdks/python/pmxt/__init__.pyMissing Return Types
def status(self):on_ServerNamespace→ should be-> Dict[str, Any]ServerManager.status()which is correctly typed as-> Dict[str, Any]def logs(self, n: int = 50):on_ServerNamespace→ should be-> List[str]ServerManager.logs()which is correctly typed as-> listImpact
pmxt.server.status()andpmxt.server.logs()are the primary user-facing server management methods. Without return type annotations users get:status()logs()These are wrapper methods — the underlying
ServerManageralready carries correct types, so the fix is a one-line annotation per method.Suggested Fix
Found by automated Python type hints audit