Skip to content

Commit 310392b

Browse files
author
Morgan McClure
committed
help mypy figure out that 'Unset' is always falsey
1 parent c8e93a9 commit 310392b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openapi_python_client/templates/types.py.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
""" Contains some shared types for properties """
22
from http import HTTPStatus
3-
from typing import Any, BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar
3+
from typing import Any, BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar, Literal
44

55
import attr
66

77

88
class Unset:
9-
def __bool__(self) -> bool:
9+
def __bool__(self) -> Literal[False]:
1010
return False
1111

1212

0 commit comments

Comments
 (0)