Skip to content
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

Fix future annotations parallelizable #1113

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

elijahbenizzy
Copy link
Collaborator

Changes

How I tested this

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

We had updated inspect.signature -> typing.get_type_hints everywhere but
here. This improves it.

See #111
(a) I don't really like this -- it should be done judiciously and not
litter the code. Circular imports are rare and they should be first
avoided then dealt with in this manner.
(b) It is particularly bad for the Hamilton codebase as types, etc...
are often defined inline and required at runtime.
@skrawcz skrawcz linked an issue Aug 30, 2024 that may be closed by this pull request
@elijahbenizzy elijahbenizzy merged commit 01233d9 into main Aug 30, 2024
24 checks passed
@elijahbenizzy elijahbenizzy deleted the fix-future-annotations-parallelizable branch August 30, 2024 20:47
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.

from __future__ import annotations breaks Parallelizable<>Collect
2 participants