Skip to content

Conversation

@RenanGreca
Copy link
Contributor

Description

When using the Worker class from this library, the Python type checker would complain about a mismatch between the temporallib.Client and temporalio.Client types in the arguments. I changed the argument to accept either type, as they are equivalent for that purpose.

I also fixed a mistake in the classdoc, which described Worker as a wrapper to Client.

Engineering checklist

  • Documentation updated
  • Have tested the workflow works as expected

@RenanGreca RenanGreca requested a review from kelkawi-a November 29, 2024 09:51
def __init__(
self,
client: Client,
client: Client | TemporalClient,
Copy link
Contributor

@kelkawi-a kelkawi-a Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe Python 3.8 doesn't support |, you'd need to use from typing import Union and do Union[Client, TemporalClient]. Could you please test the lib locally with a sample workflow run to ensure it works as intended?

General note: we could do with an integration test for this lib.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants