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

feat: add password field #515

Merged
merged 5 commits into from
Nov 25, 2022
Merged

feat: add password field #515

merged 5 commits into from
Nov 25, 2022

Conversation

tlambert03
Copy link
Member

closes #514 by adding a new widgets.Password

You can get a password widget, as usual, by specifying widget_type of 'Password'... but I also special cased arguments named "password" with an annotation of "str" that do not declare a widget_type.

both password and password2 will be Password widgets here:

@magicgui(password2={"widget_type": "Password"})
def login(username: str, password: str, password2: str):
    ...

Screen Shot 2022-11-25 at 12 28 22 PM

@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Base: 89.61% // Head: 89.63% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (400de9f) compared to base (6a77140).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #515      +/-   ##
==========================================
+ Coverage   89.61%   89.63%   +0.02%     
==========================================
  Files          36       36              
  Lines        4353     4362       +9     
==========================================
+ Hits         3901     3910       +9     
  Misses        452      452              
Impacted Files Coverage Δ
src/magicgui/backends/_ipynb/__init__.py 100.00% <ø> (ø)
src/magicgui/backends/_qtpy/__init__.py 100.00% <ø> (ø)
src/magicgui/types.py 87.17% <ø> (ø)
src/magicgui/widgets/__init__.py 100.00% <ø> (ø)
src/magicgui/widgets/bases/__init__.py 100.00% <ø> (ø)
src/magicgui/widgets/bases/_container_widget.py 91.66% <ø> (ø)
src/magicgui/backends/_ipynb/widgets.py 64.43% <100.00%> (+0.30%) ⬆️
src/magicgui/backends/_qtpy/widgets.py 88.28% <100.00%> (+0.05%) ⬆️
src/magicgui/widgets/_concrete.py 89.06% <100.00%> (+0.04%) ⬆️
src/magicgui/widgets/bases/_create_widget.py 97.50% <100.00%> (+0.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tlambert03 tlambert03 merged commit 5edccca into pyapp-kit:main Nov 25, 2022
@tlambert03 tlambert03 deleted the password branch November 25, 2022 18:11
@haesleinhuepf
Copy link
Contributor

Amazing. Thanks so much! 🎉

@tlambert03 tlambert03 added the enhancement New feature or request label Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Password field
2 participants