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

fix: Recursively evaluate guarded code #393

Merged
merged 5 commits into from Oct 31, 2023

Conversation

Mr-Pepe
Copy link
Contributor

@Mr-Pepe Mr-Pepe commented Oct 24, 2023

Partly resolves #375

  • Add test for nested guarded imports
  • Handle nested type guards

@gaborbernat
Copy link
Member

Seems it stalled.

@Mr-Pepe
Copy link
Contributor Author

Mr-Pepe commented Oct 31, 2023

It doesn't solve the Pydantic problem described in #375 but that's a Pydantic issue and I don't know if it solves @lchojnacki's problem described in #375 because they didn't respond.

But the PR is good to go from my perspective. The code does what it's supposed to do (handle nested if TYPE_CHECKING blocks) and the pipeline is green.

@gaborbernat gaborbernat reopened this Oct 31, 2023
@gaborbernat gaborbernat marked this pull request as ready for review October 31, 2023 16:28
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.

@gaborbernat gaborbernat merged commit 3eeb664 into tox-dev:main Oct 31, 2023
10 checks passed
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.

Resolving multiple imports guarded by typing.TYPE_CHECKING
2 participants