Skip to content

Commit

Permalink
fix: fix pr comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
LasseGravesen committed Apr 24, 2020
1 parent e9e9cd7 commit 4ec2131
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion changes/1424-atheuz.md
@@ -1 +1 @@
include format with secret types #546
include `format` with secret types
6 changes: 2 additions & 4 deletions pydantic/types.py
Expand Up @@ -530,8 +530,7 @@ def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None:
class SecretStr:
@classmethod
def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None:
field_schema.update(type='string', writeOnly=True)
field_schema.update(type='string', format='password')
field_schema.update(type='string', writeOnly=True, format='password')

@classmethod
def __get_validators__(cls) -> 'CallableGenerator':
Expand Down Expand Up @@ -567,8 +566,7 @@ def get_secret_value(self) -> str:
class SecretBytes:
@classmethod
def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None:
field_schema.update(type='string', writeOnly=True)
field_schema.update(type='string', format='password')
field_schema.update(type='string', writeOnly=True, format='password')

@classmethod
def __get_validators__(cls) -> 'CallableGenerator':
Expand Down

0 comments on commit 4ec2131

Please sign in to comment.