-
Notifications
You must be signed in to change notification settings - Fork 21
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
Forward References #45
Comments
Well, as it turns out, forward reference is not supported yet. Sorry. I will look into this as soon as I have a moment. Enforce can accept strings as type hints but the types need to exist at the moment of decorating. I think it is not very hard to fix, just gonna take some time. Forward reference need to invoke a validation tree generation when it is encountered for the first time and replace itself with it before proceeding. I think this is the fastest way to implement it at the moment. Thanks for the report! |
Run into this a few times as well. Would love for forward refs to be implemented. |
…upport for the forward references (#45) and added inline type assertions.
BTW, the |
Do you support forward references? I'm getting this behavior:
The error states:
Argument 'x' was not of type typing.List<~T>[typing.Union[int, _ForwardRef('MyType')]]. Actual type was typing.List[int, typing.List].
Are forward references not supported, is this a bug, or am I doing something wrong? Thanks :)
The text was updated successfully, but these errors were encountered: