Skip to content

Commit 7916aeb

Browse files
Clarify type annotation in baker.py (#524)
* Clarify type annotation of `baker.make._save_kwargs` parameter * Clarify type annotation of `baker.prepare.attrs` parameter
1 parent 6d70237 commit 7916aeb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

model_bakery/baker.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def make(
8383
_model: Union[str, Type[M]],
8484
_quantity: None = None,
8585
make_m2m: bool = False,
86-
_save_kwargs: Optional[Dict] = None,
86+
_save_kwargs: Optional[Dict[str, Any]] = None,
8787
_refresh_after_create: bool = False,
8888
_create_files: bool = False,
8989
_using: str = "",
@@ -97,7 +97,7 @@ def make(
9797
_model: Union[str, Type[M]],
9898
_quantity: int,
9999
make_m2m: bool = False,
100-
_save_kwargs: Optional[Dict] = None,
100+
_save_kwargs: Optional[Dict[str, Any]] = None,
101101
_refresh_after_create: bool = False,
102102
_create_files: bool = False,
103103
_using: str = "",
@@ -111,7 +111,7 @@ def make(
111111
_model,
112112
_quantity: Optional[int] = None,
113113
make_m2m: bool = False,
114-
_save_kwargs: Optional[Dict] = None,
114+
_save_kwargs: Optional[Dict[str, Any]] = None,
115115
_refresh_after_create: bool = False,
116116
_create_files: bool = False,
117117
_using: str = "",
@@ -155,7 +155,7 @@ def prepare(
155155
_quantity: None = None,
156156
_save_related: bool = False,
157157
_using: str = "",
158-
**attrs,
158+
**attrs: Any,
159159
) -> M: ...
160160

161161

@@ -166,7 +166,7 @@ def prepare(
166166
_save_related: bool = False,
167167
_using: str = "",
168168
_fill_optional: Union[List[str], bool] = False,
169-
**attrs,
169+
**attrs: Any,
170170
) -> List[M]: ...
171171

172172

@@ -176,7 +176,7 @@ def prepare(
176176
_save_related: bool = False,
177177
_using: str = "",
178178
_fill_optional: Union[List[str], bool] = False,
179-
**attrs,
179+
**attrs: Any,
180180
):
181181
"""Create but do not persist an instance from a given model.
182182

0 commit comments

Comments
 (0)