Skip to content

[Bug] Pyright typing issue #795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mattbrandman opened this issue Mar 25, 2025 · 2 comments
Open

[Bug] Pyright typing issue #795

mattbrandman opened this issue Mar 25, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@mattbrandman
Copy link

mattbrandman commented Mar 25, 2025

What are you really trying to do?

Ensure that my type checking returns minimal errors when using temporal execute_activity

Describe the bug

Type checking with Pyright strict returns partiallyUnknown error when using Temporal execute_activity I believe because the line here

result_type: Optional[Type] = None,
has an implicit Any on the optional Type

Adding an explicit Any allows Pyright to properly parse the block

Minimal Reproduction

Look at any execute_activity call in the samples repo with Pyright strict enabled in VSCode

Environment/Versions

  • OS and processor: [e.g. M1 Mac, x86 Windows, Linux]
  • Temporal Version: [e.g. 1.14.0?] and/or SDK version
  • Are you using Docker or Kubernetes or building Temporal from source?

Additional context

@mattbrandman mattbrandman added the bug Something isn't working label Mar 25, 2025
@mattbrandman
Copy link
Author

Happy to open the PR for this if it's safe to add the explicit Any there

@dandavison
Copy link
Contributor

Thanks @mattbrandman. Yes, PR welcome!

@cretz cretz changed the title [Bug] FILL_TITLE_HERE [Bug] Pyright typing issue Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants