Skip to content

Add support for recursive type hints #248

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

Merged
merged 2 commits into from
Jul 31, 2022

Conversation

hmc-cs-mdrissi
Copy link
Contributor

@hmc-cs-mdrissi hmc-cs-mdrissi commented Jul 29, 2022

Closes #223. This is simple approach that uses string of forward reference and avoids needing to evaluate recursive/mutually recursive type aliases.

I've added two test cases that use recursive aliases and previously would crash. I've also been using this fork for a while in company internal codebase and it's worked well for our recursive annotations.

Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the type checker and add a changelog entry? Thanks!

@hmc-cs-mdrissi
Copy link
Contributor Author

Fixed. Thank you for the fast review.

@gaborbernat gaborbernat merged commit 5bb2358 into tox-dev:main Jul 31, 2022
@hmc-cs-mdrissi hmc-cs-mdrissi deleted the md/support_recursive_types branch August 1, 2022 00:44
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.

Recursion errors with some recursive types
2 participants