Skip to content

Add generic type safety hints #92

Closed

Description

The package is lacking type safety in a bunch of places which are causing partially unknown type safety warnings -

Type of "schedule_new_orchestration" is partially unknown
  Type of "schedule_new_orchestration" is "(orchestrator: ((OrchestrationContext, TInput@schedule_new_orchestration) -> (Generator[Task[Unknown], Any, TOutput@schedule_new_orchestration] | TOutput@schedule_new_orchestration)) | str, *, input: TInput@schedule_new_orchestration | None = None, instance_id: str | None = None, start_at: datetime | None = None, reuse_id_policy: OrchestrationIdReusePolicy | None = None, tags: dict[str, str] | None = None, version: str | None = None) -> str"

Though they're not affecting runtime stability, its good to have clean type hints to ensure Pylance can always infer hints cleanly in any environment.

Sample PR with some changes - #91
It would be great to see generic type-hints for all functions.

Activity

  1. larohra commented on Jan 5, 2026

    @larohra
    Author

    Additional places where type safety is missing -

    class OrchestrationContext(ABC):
    
      @abstractmethod
          def wait_for_external_event(self, name: str) -> Task:
    
      @abstractmethod
          def create_timer(self, fire_at: Union[datetime, timedelta]) -> Task:
  2. andystaples commented on Jan 12, 2026

    @andystaples
    Contributor

    Didn't see these additional places until after #104 was merged, keeping this issue around until those can be fixed too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions