Skip to content

Commit 7e18e39

Browse files
Fix ignored fields on types
1 parent 95417b2 commit 7e18e39

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

record_api/type_analysis.py

+9
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ def module(self) -> typing.Optional[str]:
150150
return None
151151

152152

153+
# Set field set to be all fields, so none are ignored even if not set
154+
@property # type: ignore
155+
def __fields_set__(self) -> typing.Set[str]: # type: ignore
156+
return set(self.__values__.keys())
157+
158+
@__fields_set__.setter
159+
def __fields_set__(self, val: typing.Set[str]) -> None:
160+
pass
161+
153162
class InputTypeBase(BaseModel, abc.ABC):
154163
@abc.abstractmethod
155164
def to_output(self) -> OutputType:

0 commit comments

Comments
 (0)