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

Importing runtype breaks (at least) get_type_hints #14

Closed
apirogov opened this issue Dec 15, 2022 · 2 comments
Closed

Importing runtype breaks (at least) get_type_hints #14

apirogov opened this issue Dec 15, 2022 · 2 comments

Comments

@apirogov
Copy link

apirogov commented Dec 15, 2022

Is runtype somehow messing with typing, typing_extensions or pydantic?

A thing that looks relevant in my logs is:

/home/admin/.pyenv/versions/3.8.10/lib/python3.8/typing.py:1264: in get_type_hints
    value = _eval_type(value, globalns, localns)
/home/admin/.pyenv/versions/3.8.10/lib/python3.8/typing.py:270: in _eval_type
    return t._evaluate(globalns, localns)
E   TypeError: _evaluate() missing 1 required positional argument: '_'

Even just importing runtype.validation triggers that problem, so I'd expect it does some monkey patching on import.

@erezsh
Copy link
Owner

erezsh commented Dec 15, 2022

Thanks for letting me know!

I merged a fix to the master branch. Let me know if that helped.

@apirogov
Copy link
Author

Yes, that resolved the issue, thanks!

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

No branches or pull requests

2 participants