Skip to content

Support --shadow-file with --native-parser#21623

Open
JukkaL wants to merge 5 commits into
masterfrom
native-parsers-shadow-file
Open

Support --shadow-file with --native-parser#21623
JukkaL wants to merge 5 commits into
masterfrom
native-parsers-shadow-file

Conversation

@JukkaL

@JukkaL JukkaL commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

This comment has been minimized.

@JukkaL JukkaL requested a review from ilevkivskyi June 18, 2026 17:17

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LG, but there are couple problems in tests.

Comment thread test-data/unit/cmdline.test Outdated
== Return code: 0

[case testShadowFileWithNativeParserParallel]
# cmd: mypy --native-parser --shadow-file a.py a_shadow.py main.py a.py b.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The test name says Parallel but the command line doesn't specify --num-workers. You should add e.g. --num-workers=4.

reveal_type(x)
[out]
a.py:2: note: Revealed type is "str"
== Return code: 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it is worth adding an incremental test for --shadow-file in parallel mode as well.

@github-actions

This comment has been minimized.

Comment thread test-data/unit/check-incremental.test Outdated
tmp/b.py:2: note: Revealed type is "builtins.int"

[case testIncrementalNativeParserShadowFileIntroduced]
# flags: --native-parser --num-workers=2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, btw, all testcheck.py tests are run in parallel mode in the parallel CI jobs. So I am not sure we need to keep both here. (The cmdline.test however is not run by testcheck.py, so keeping a separate parallel test there makes sense.)

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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