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

Improvement: error_msg changed to f-strings #874

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xunzhou
Copy link

@xunzhou xunzhou commented Sep 12, 2022

As @colin-pm suggested in #873 (comment),
updating error_msg to f-string

@xunzhou xunzhou requested a review from a team as a code owner September 12, 2022 19:30
Copy link
Member

@colin-pm colin-pm left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for going through the code and changing all the error messages! Looks good to me besides one issue at the bottom.

One extra thing that would be nice is to shorten the line length of these messages to conform to PEP-8. I think you can automate that by running --experimental-string-processing with black.

hvac/utils.py Outdated Show resolved Hide resolved
@colin-pm colin-pm added enhancement a new feature or addition maintenance General technical debt labels Sep 12, 2022
Co-authored-by: Colin McAllister <colinmca242@gmail.com>
@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Merging #874 (e727a50) into develop (7b94991) will not change coverage.
The diff coverage is 76.74%.

@@           Coverage Diff            @@
##           develop     #874   +/-   ##
========================================
  Coverage    77.96%   77.96%           
========================================
  Files           64       64           
  Lines         3608     3608           
========================================
  Hits          2813     2813           
  Misses         795      795           
Impacted Files Coverage Δ
hvac/api/auth_methods/aws.py 57.32% <0.00%> (ø)
hvac/api/secrets_engines/gcp.py 48.33% <0.00%> (ø)
hvac/utils.py 79.09% <50.00%> (ø)
hvac/api/secrets_engines/transit.py 90.78% <73.33%> (ø)
hvac/api/auth_methods/approle.py 100.00% <100.00%> (ø)
hvac/api/auth_methods/azure.py 91.48% <100.00%> (ø)
hvac/api/auth_methods/gcp.py 89.74% <100.00%> (ø)
hvac/api/auth_methods/github.py 100.00% <100.00%> (ø)
hvac/api/auth_methods/mfa.py 100.00% <100.00%> (ø)
hvac/api/secrets_engines/aws.py 96.15% <100.00%> (ø)
... and 2 more

@xunzhou
Copy link
Author

xunzhou commented Sep 13, 2022

@colin-pm f-string for other strings like api_auth ?

@colin-pm
Copy link
Member

@xunzhou The more f-strings, the better imo

The pylint errors could be fixed by running black with the --experimental-string-processing as I recommended above.

@briantist briantist force-pushed the develop branch 2 times, most recently from 085b858 to 9dbfa98 Compare May 10, 2023 06:41
@briantist briantist changed the base branch from develop to main June 17, 2023 21:41
@briantist
Copy link
Contributor

The hvac project is simplifying its developer workflow and removing the develop branch. Please be aware for future PRs that the project's default branch is now main.

Since your PR was opened before this change, I have:

  • updated your PR to merge into the project's main branch

You will need to pull down the latest main branch, and then rebase your branch against main and force push:

git rebase main
git push -f

Because this PR has conflicts, I have not done the rebase myself, but if you need a hand, let me know.

@briantist briantist added the waiting-reply waiting for more information (probably for a while) label Jun 17, 2023
@briantist briantist mentioned this pull request Jun 17, 2023
@dosisod dosisod mentioned this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a new feature or addition maintenance General technical debt waiting-reply waiting for more information (probably for a while)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants