Skip to content

Fix strict null typing issues in symbol extractor script#15983

Open
dcbaker wants to merge 2 commits into
mesonbuild:masterfrom
dcbaker:submit/symbol-extractor-strict-null
Open

Fix strict null typing issues in symbol extractor script#15983
dcbaker wants to merge 2 commits into
mesonbuild:masterfrom
dcbaker:submit/symbol-extractor-strict-null

Conversation

@dcbaker

@dcbaker dcbaker commented Jul 6, 2026

Copy link
Copy Markdown
Member

After reviewing #15975, I noticed that there are several more cases of this. Since I've been working on fixing strict null issues anyway, this seemed like a good place for mypy to help us out.

@dcbaker dcbaker requested a review from jpakkane as a code owner July 6, 2026 18:26
@dcbaker dcbaker added the typing label Jul 6, 2026
@dcbaker dcbaker force-pushed the submit/symbol-extractor-strict-null branch from fcf3b78 to f4122d1 Compare July 6, 2026 18:27
dcbaker added 2 commits July 6, 2026 18:47
There's some weird combination of "use argparse" and "don't use
argparse" going on here. Plus some cases where a Protocol and help with
typing.
There are a fair number of cases here where we return None and claim
that we don't. This leads to cases where we will do the wrong thing when
we get a None. Fix the annotations, fix the usages, tell mypy to enforce
this.
@dcbaker dcbaker force-pushed the submit/symbol-extractor-strict-null branch from f4122d1 to 2661c59 Compare July 6, 2026 18:48
@dcbaker dcbaker added this to the 1.13 milestone Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant