Skip to content

Commit

Permalink
missing qualifiers key
Browse files Browse the repository at this point in the history
  • Loading branch information
Joris Bekkers committed Aug 16, 2023
1 parent 5751a88 commit bc49399
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kloppy/domain/services/event_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def create_event(event_cls: Type[T], **kwargs) -> T:
if "freeze_frame" not in kwargs:
kwargs["freeze_frame"] = None

if 'qualifiers' not in kwargs:
kwargs['qualifiers'] = None

all_kwargs = dict(**kwargs, **extra_kwargs)

relevant_kwargs = {
Expand All @@ -55,7 +58,7 @@ def create_event(event_cls: Type[T], **kwargs) -> T:
and field.name not in all_kwargs
)
}

if len(relevant_kwargs) < len(all_kwargs):
skipped_kwargs = set(all_kwargs.keys()) - set(relevant_kwargs.keys())
warnings.warn(
Expand Down

0 comments on commit bc49399

Please sign in to comment.