Skip to content

Commit

Permalink
#124: Corrected type hint for recipe param "_model" (#128)
Browse files Browse the repository at this point in the history
* #124: Corrected type hint for recipe param "_model"

* #124: Added changelog entry
  • Loading branch information
Ron authored Nov 23, 2020
1 parent 244eae0 commit 69d110c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Type hinting fixed for Recipe "_model" parameter

### Removed


Expand Down
3 changes: 1 addition & 2 deletions model_bakery/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Any, Dict, List, Type, Union, cast

from django.db.models import Model
from django.db.models.base import ModelBase

from . import baker
from .exceptions import RecipeNotFound
Expand All @@ -15,7 +14,7 @@


class Recipe(object):
def __init__(self, _model: Union[str, Type[ModelBase]], **attrs) -> None:
def __init__(self, _model: Union[str, Type[Model]], **attrs) -> None:
self.attr_mapping = attrs
self._model = _model
# _iterator_backups will hold values of the form (backup_iterator, usable_iterator).
Expand Down

0 comments on commit 69d110c

Please sign in to comment.