Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit ddf3569

Browse files
committed
FIX: black formatting
1 parent 00a73b4 commit ddf3569

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pydantic_openapi_schema/v3_0_3/contact.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ class Contact(BaseModel):
1818
The URL pointing to the contact information. MUST be in the format of a URL.
1919
"""
2020

21-
email: Optional[Union[EmailStr,str]] = None
21+
email: Optional[Union[EmailStr, str]] = None
2222
"""
2323
The email address of the contact person/organization. MUST be in the format of an email address.
2424
"""
25+
2526
@validator("email", pre=True)
2627
def validate_email( # pylint: disable=no-self-argument
27-
cls, v: Union[EmailStr, str],
28+
cls,
29+
v: Union[EmailStr, str],
2830
) -> EmailStr:
2931
"""Validates that email is a valid email address
3032
@@ -41,7 +43,6 @@ def validate_email( # pylint: disable=no-self-argument
4143
v = EmailStr(v)
4244
return v
4345

44-
4546
class Config:
4647
extra = Extra.ignore
4748
schema_extra = {

pydantic_openapi_schema/v3_1_0/contact.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ class Contact(BaseModel):
2424
The email address of the contact person/organization.
2525
MUST be in the form of an email address.
2626
"""
27+
2728
@validator("email", pre=True)
2829
def validate_email( # pylint: disable=no-self-argument
29-
cls, v: Union[EmailStr, str],
30+
cls,
31+
v: Union[EmailStr, str],
3032
) -> EmailStr:
3133
"""Validates that email is a valid email address
3234

0 commit comments

Comments
 (0)