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

Restore prompts while retaining support for suppressing prompts #452

Merged
merged 7 commits into from
Feb 9, 2019

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Feb 9, 2019

As discussed in #450, the work in #426 had some unintended side-effects, namely that it unconditionally suppressed prompts for username and password (and thus also keyring resolution).

This PR goes back in time, committing tests to the code prior to #426 plus some commits on top of #426, then merges the two, fixing the failing tests.

@codecov
Copy link

codecov bot commented Feb 9, 2019

Codecov Report

Merging #452 into master will increase coverage by 0.9%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #452     +/-   ##
=========================================
+ Coverage   79.94%   80.85%   +0.9%     
=========================================
  Files          14       14             
  Lines         748      893    +145     
  Branches      108      141     +33     
=========================================
+ Hits          598      722    +124     
- Misses        114      132     +18     
- Partials       36       39      +3
Impacted Files Coverage Δ
twine/utils.py 83.68% <100%> (ø) ⬆️
twine/repository.py 68.84% <0%> (-4.5%) ⬇️
twine/settings.py 92.63% <0%> (-0.71%) ⬇️
twine/cli.py 100% <0%> (ø) ⬆️
twine/commands/check.py 100% <0%> (ø) ⬆️
twine/commands/upload.py 76.47% <0%> (+1.47%) ⬆️
twine/wheel.py 91.02% <0%> (+6.71%) ⬆️

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 61d01ac...0f6a1e1. Read the comment docs.

@@ -195,7 +195,7 @@ def get_userpass_value(cli_value, config, key, prompt_strategy=None):
"""
if cli_value is not None:
return cli_value
elif key in config:
elif config.get(key) is not None:
Copy link
Member

@theacodes theacodes Feb 9, 2019

Choose a reason for hiding this comment

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

Always remember your none checks

@theacodes theacodes merged commit 95ecde2 into master Feb 9, 2019
@theacodes theacodes deleted the bugfix/450-no-credentials branch February 9, 2019 18:36
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.

3 participants