-
Notifications
You must be signed in to change notification settings - Fork 774
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
not-sure-if-bug: strange mypy behavior in the latest sqlglot #1796
Comments
Not sure why this is happening.. any execution path in IIRC, On another note: I think we should clean up [1] python/mypy#3283 |
can you repro this @georgesittas ? |
Yeah and it seems like an issue in general, not just our latest release. |
I can also verify that by getting rid of the # With just this mypy stopped complaining
def parse_one(
sql: str,
read: DialectType = None,
into: t.Optional[exp.IntoType] = None,
**opts,
) -> Expression:
# Definition goes here |
I have upgraded both mypy and sqlglot recently. But I'm not sure anymore. Maybe it was indeed happening before, but just silenced. |
Looks like it's a mypy bug: python/mypy#10817 |
@pkit take a look at the PR if you like, it solves the issue. |
Looks good, I still don't like mypy though. |
Yeah.. It has some rough edges, but I like to think that in the long run it helps with the development process by catching errors early vs at runtime. Hopefully it also helps by "documenting" the code more than making it unreadable. :-) |
Could be a mypy bug or the usual mypy idiocy, but just FYI.
The text was updated successfully, but these errors were encountered: