8000 fastparse: fix type checking on 3.8 by hauntsaninja · Pull Request #9693 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

fastparse: fix type checking on 3.8 #9693

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 1 commit into from
Nov 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fastparse: fix type checking on 3.8
This got broken by python/typeshed#4740
It took me a little bit to figure out how this evaded all our CI, but
it's because we type check with version 3.5 and mypyc only with 3.5 and
3.7. That is, we do not type check with 3.8 or later and so do not check
against stdlib's AST types.

mypyc wheels did break through, but I'm not sure anyone gets to see
those. Maybe we should add a badge for them to the README.

I only noticed this because I was trying to get mypy_primer to mypyc
compile sometimes.
  • Loading branch information
hauntsaninja committed Nov 3, 2020
commit df3d7d77f6c53a65175435dea9d0732cd02a0dcc
6 changes: 3 additions & 3 deletions mypy/fastparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,11 +676,11 @@ def transform_args(self,
names.append(args.vararg)

# keyword-only arguments with defaults
for a, d in zip(args.kwonlyargs, args.kw_defaults):
for a, kd in zip(args.kwonlyargs, args.kw_defaults):
new_args.append(self.make_argument(
a,
d,
ARG_NAMED if d is None else ARG_NAMED_OPT,
kd,
ARG_NAMED if kd is None else ARG_NAMED_OPT,
no_type_check))
names.append(a)

Expand Down
0