-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
change secret types example #890
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #890 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 16 16
Lines 2716 2742 +26
Branches 518 521 +3
=====================================
+ Hits 2716 2742 +26
Continue to review full report at Codecov.
|
|
Looks good to me
Feel free to do this if you want credit for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, but a few small things to change.
Maybe best for me to merge #884 and the PR which changes how print works in examples, which I'm working on today.
docs/examples/ex_secret_types.py
Outdated
| print(sm) | ||
| #> SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********') | ||
| # > SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # > SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********') | |
| #> SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********') |
and below.
docs/examples/ex_secret_types.py
Outdated
| print(sm) | ||
| #> SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********') | ||
| # > SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********') | ||
| print(sm.password.display()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.display() is deprecated after #884 which will be merged before this (try to merge in the order PRs are created unless there's a good reason not to)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to print(str(sm.password))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM.
docs/examples/ex_secret_types.py
Outdated
| print(sm) | ||
| print(str(sm.password)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| print(str(sm.password)) | |
| print(repr(sm.password)) |
print(str(x)) is the same as print(x)
|
thank you very much. |
* change secret types example * add changes file * add address review comments * remove redundant str() call
Change Summary
I was examining #884, which discussed the secret types. I found that the example for secret types could be slightly more clear.
Apologies if I am in error with creating this PR, I do not have experience submitting PR to an open source code base.
Checklist
changes/<pull request or issue id>-<github username>.mdfile added describing change(see changes/README.md for details)