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

change secret types example #890

Merged
merged 5 commits into from Oct 14, 2019
Merged

Conversation

@ashears
Copy link
Contributor

ashears commented Oct 11, 2019

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

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)
Ashton Shears
@codecov

This comment has been minimized.

Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #890 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #890   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          16     16           
  Lines        2716   2742   +26     
  Branches      518    521    +3     
=====================================
+ Hits         2716   2742   +26
Impacted Files Coverage Δ
pydantic/error_wrappers.py 100% <0%> (ø) ⬆️
pydantic/types.py 100% <0%> (ø) ⬆️
pydantic/fields.py 100% <0%> (ø) ⬆️
pydantic/typing.py 100% <0%> (ø) ⬆️
pydantic/utils.py 100% <0%> (ø) ⬆️
pydantic/networks.py 100% <0%> (ø) ⬆️
pydantic/schema.py 100% <0%> (ø) ⬆️

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 e7227db...812e8ed. Read the comment docs.

@ashears ashears marked this pull request as ready for review Oct 11, 2019
@dmontagu

This comment has been minimized.

Copy link
Collaborator

dmontagu commented Oct 11, 2019

Looks good to me

changes/-.md file added describing change
(see changes/README.md for details)

Feel free to do this if you want credit for your contribution!

Ashton Shears
Copy link
Owner

samuelcolvin left a comment

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.

print(sm)
#> SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********')
# > SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********')

This comment has been minimized.

Copy link
@samuelcolvin

samuelcolvin Oct 14, 2019

Owner
Suggested change
# > SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********')
#> SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********')

and below.

print(sm)
#> SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********')
# > SimpleModel password=SecretStr('**********') password_bytes=SecretBytes(b'**********')
print(sm.password.display())

This comment has been minimized.

Copy link
@samuelcolvin

samuelcolvin Oct 14, 2019

Owner

.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)

This comment has been minimized.

Copy link
@ashears

ashears Oct 14, 2019

Author Contributor

Changed to print(str(sm.password))

Ashton Shears and others added 2 commits Oct 14, 2019
Ashton Shears
Copy link
Owner

samuelcolvin left a comment

otherwise LGTM.

print(sm)
print(str(sm.password))

This comment has been minimized.

Copy link
@samuelcolvin

samuelcolvin Oct 14, 2019

Owner
Suggested change
print(str(sm.password))
print(repr(sm.password))

print(str(x)) is the same as print(x)

Ashton Shears
@samuelcolvin samuelcolvin merged commit b1e61b4 into samuelcolvin:master Oct 14, 2019
10 checks passed
10 checks passed
Header rules No header rules processed
Details
Pages changed 82 new files uploaded
Details
Redirect rules No redirect rules processed
Details
Mixed content No mixed content detected
Details
codecov/project 100% remains the same compared to e7227db
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
samuelcolvin.pydantic Build #20191014.19 succeeded
Details
samuelcolvin.pydantic (Job Python36) Job Python36 succeeded
Details
samuelcolvin.pydantic (Job Python37) Job Python37 succeeded
Details
@samuelcolvin

This comment has been minimized.

Copy link
Owner

samuelcolvin commented Oct 14, 2019

thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.