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

Make mypy ignore CoreSchema's typing #528

Merged
merged 2 commits into from
Apr 7, 2023
Merged

Make mypy ignore CoreSchema's typing #528

merged 2 commits into from
Apr 7, 2023

Conversation

adriangb
Copy link
Member

@adriangb adriangb commented Apr 6, 2023

No description provided.

MYPY: Literal[False] = False


if not MYPY:
Copy link
Member Author

Choose a reason for hiding this comment

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

MyPy looks for the name MYPY and ignores elif False. Pyright needs the elif False to not complain about CoreSchema getting re-defined.

@samuelcolvin
Copy link
Member

But now we can't use mypy properly on pydantic.

I'm afk, but I might have another solution.

@adriangb
Copy link
Member Author

adriangb commented Apr 6, 2023

Correct but we really should use pyright anyway since mypy can't type check fully (because we have to run it with --disable-recursive-aliases and even then it takes minute(s)`

@codspeed-hq
Copy link

codspeed-hq bot commented Apr 6, 2023

CodSpeed Performance Report

Merging #528 fix-mypy (5f5ad8a) will not alter performances.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 95 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

@samuelcolvin samuelcolvin enabled auto-merge (squash) April 7, 2023 10:33
Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

LGTM

@samuelcolvin samuelcolvin merged commit 534630f into main Apr 7, 2023
@samuelcolvin samuelcolvin deleted the fix-mypy branch April 7, 2023 10:37
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.

2 participants