Skip to content

[python-types] __init__.py: 2 public methods missing return type annotations #233

@realfishsam

Description

@realfishsam

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions