Skip to content

Clean up gnome mkenums, and use typed_kwargs#9700

Merged
eli-schwartz merged 5 commits intomesonbuild:masterfrom
dcbaker:submit/gnome-mkenums-type-kwargs
Dec 20, 2021
Merged

Clean up gnome mkenums, and use typed_kwargs#9700
eli-schwartz merged 5 commits intomesonbuild:masterfrom
dcbaker:submit/gnome-mkenums-type-kwargs

Conversation

@dcbaker
Copy link
Member

@dcbaker dcbaker commented Dec 5, 2021

this makes two sets of distinct changes

  1. it cleans up mkenums and mkenums_simple so that they don't call into each other
  2. it uses typed_kwargs for both of them

This is currently based on #9594, and that should be reviewed and merged first.

This does not fix all the type issues in the gnome module, I'll follow this up with another series to address that separately, but this does get us complete typed_pos_args and typed_kwargs coverage

@codecov
Copy link

codecov bot commented Dec 5, 2021

Codecov Report

Merging #9700 (9baf317) into master (c5ce974) will decrease coverage by 3.11%.
The diff coverage is n/a.

❗ Current head 9baf317 differs from pull request most recent head 06bb7fd. Consider uploading reports for the commit 06bb7fd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9700      +/-   ##
==========================================
- Coverage   67.12%   64.00%   -3.12%     
==========================================
  Files         404      202     -202     
  Lines       85845    42770   -43075     
  Branches    18955     9337    -9618     
==========================================
- Hits        57621    27377   -30244     
+ Misses      23680    13182   -10498     
+ Partials     4544     2211    -2333     
Impacted Files Coverage Δ
rewriter.py 79.34% <0.00%> (-0.98%) ⬇️
minstall.py 66.18% <0.00%> (-0.07%) ⬇️
mtest.py 76.08% <0.00%> (-0.04%) ⬇️
interpreter/interpreterobjects.py 84.98% <0.00%> (-0.03%) ⬇️
backend/backends.py 82.48% <0.00%> (-0.02%) ⬇️
envconfig.py 73.20% <0.00%> (ø)
modules/windows.py 0.00% <0.00%> (ø)
mesonlib/universal.py 75.62% <0.00%> (ø)
mesonbuild/modules/gnome.py
mesonbuild/modules/qt5.py
... and 201 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5ce974...06bb7fd. Read the comment docs.

@dcbaker dcbaker force-pushed the submit/gnome-mkenums-type-kwargs branch from 59233d4 to e5b86f5 Compare December 7, 2021 21:15
@dcbaker dcbaker force-pushed the submit/gnome-mkenums-type-kwargs branch 2 times, most recently from b3d288c to 9b8fc55 Compare December 9, 2021 21:00
@dcbaker
Copy link
Member Author

dcbaker commented Dec 15, 2021

Anyone planning to look at this, or should I just merge it?

This has never been in permittedKwargs, it does nothing, and it was
never documented, so it seems pretty safe to just remove it.
the simple_version still goes through the big version of this function,
but at last we have type checking
It's just a bad idea, but especially once we start adding type
annotations to both of them.
This is the last function that doesn't use typed_kwargs. This now uses
the same shared path as the mkenums_simple
because List is invariant, and that's not what we want.
@dcbaker dcbaker force-pushed the submit/gnome-mkenums-type-kwargs branch from 9b8fc55 to 06bb7fd Compare December 20, 2021 18:48
@eli-schwartz eli-schwartz merged commit 3656b8c into mesonbuild:master Dec 20, 2021
@dcbaker dcbaker deleted the submit/gnome-mkenums-type-kwargs branch December 20, 2021 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants