8000 Fix is_none_type · pydantic/pydantic@aab48c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit aab48c9

Browse files
committed
Fix is_none_type
1 parent c009124 commit aab48c9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pydantic/typing.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,7 @@ def is_none_type(type_: Any) -> bool:
360360
else:
361361

362362
def is_none_type(type_: Any) -> bool:
363-
for none_type in NONE_TYPES:
364-
if type_ is none_type:
365-
return True
366-
return False
363+
return type_ in NONE_TYPES
367364

368365

369366
def display_as_type(v: Type[Any]) -> str:

0 commit comments

Comments
 (0)
0