Skip to content
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

Make _magicgui.pyi stubs #126

Merged
merged 3 commits into from
Jan 24, 2021
Merged

Conversation

tlambert03
Copy link
Member

The type annotations in _magicgui.py got a little unsightly in #117. This puts all of the overloads and other typing stuff into _magicgui.pyi. Tests for typing annotations were added (in the typesafety folder) in #117 and are still passing here.

@codecov
Copy link

codecov bot commented Jan 23, 2021

Codecov Report

Merging #126 (ca60ee1) into master (3d19be7) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
- Coverage   90.55%   90.51%   -0.04%     
==========================================
  Files          25       25              
  Lines        2445     2435      -10     
==========================================
- Hits         2214     2204      -10     
  Misses        231      231              
Impacted Files Coverage Δ
magicgui/_magicgui.py 95.34% <100.00%> (-0.88%) ⬇️

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 3d19be7...ca60ee1. Read the comment docs.

Copy link
Contributor

@jni jni left a comment

Choose a reason for hiding this comment

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

Wow, you figured it out??? What was the issue?

app: AppRef = None,
**param_options: dict,
) -> Callable[[Callable[..., _R]], MainFunctionGui[_R]]: ...
@overload # noqa: E302
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you squishing this so much?

Copy link
Member Author

Choose a reason for hiding this comment

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

that's what black does to pyi files! 😂

Copy link
Member Author

@tlambert03 tlambert03 Jan 24, 2021

Choose a reason for hiding this comment

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

What was the issue?

turns out it was just me being dumb. I was trying to test it interactively in the _magicgui.py file. Now that I have the tests in typesafety I realized they were working even though it didn't seem to be working inside of _magicgui.py ... so I just tried somewhere else and it worked!

Copy link
Contributor

Choose a reason for hiding this comment

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

that's what black does to pyi files! 😂

🤢

@tlambert03 tlambert03 merged commit 8855f45 into pyapp-kit:master Jan 24, 2021
@tlambert03 tlambert03 deleted the magicgui-type-stubs branch January 24, 2021 01:35
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.

None yet

2 participants