-
Notifications
You must be signed in to change notification settings - Fork 196
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
make @m.leave() recognize function return using new Union syntax | #414
Comments
Looks like the new Unions are not being identified because they don't define
cc: @MaggieMoss |
@benhgreen what do you get for |
@jimmylai In this example, the |
We probably should bring this up to Maggie on her original post on Worksplace, to see if it would be beneficial to define On LibCST side, we can probably go with |
Since they're string literals, no import would be needed. |
These unions were introduced in Python 3.10 and do not define __origin__, so some extra checks are necessary to identify then. Since there is not yet a 3.10 build, a somewhat hacky test was added to simulate one of these new Unions. Resolves Instagram#414.
These unions were introduced in Python 3.10 and do not define __origin__, so some extra checks are necessary to identify then. Since there is not yet a 3.10 build, a somewhat hacky test was added to simulate one of these new Unions. Resolves #414.
@m.leave
throws an exception when function return use new union syntax:Old Union syntax works:
Not using
@m.leave
works:The text was updated successfully, but these errors were encountered: