from __future__ import annotations
breaks decorators
#1259
Labels
triage
label for issues that need to be triaged.
from __future__ import annotations
breaks decorators
#1259
Current behavior
If I define a step with the
@dataloader
decorator in a file that includesfrom __future__ import annotations
, Hamilton cannot build the DAG because of type issuesStack Traces
Screenshots
Steps to replicate behavior
Simple example:
Then try running the
main.py
script withpython main.py
, which will result in the error aboveLibrary & System Information
Python 3.12.7, hamilton 1.85.0, error replicated in Mac OS and Ubuntu Linux in a minimal virtual environment that just contains hamilton and its dependencies
Expected behavior
Hamilton should be able to build DAGs when types annotations are stringified
Additional context
This issue will eventually become a blocker for compatibility with python 3.14, where stringified annotations become the default (change already merged in python 3.14 alpha 0, though there is always the chance it could be reverted prior to release)
The text was updated successfully, but these errors were encountered: