Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mypy_django_plugin/transformers/orm_lookups.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def typecheck_queryset_filter(ctx: MethodContext, django_context: DjangoContext)
# Expected formal arguments for filter methods are `*args` and `**kwargs`. We'll only typecheck
# `**kwargs`, which means that `arg_names[1]` is what we're interested in.

lookup_kwargs = ctx.arg_names[1]
provided_lookup_types = ctx.arg_types[1]
lookup_kwargs = ctx.arg_names[1] if len(ctx.arg_names) >= 2 else []
provided_lookup_types = ctx.arg_types[1] if len(ctx.arg_types) >= 2 else []

assert isinstance(ctx.type, Instance)

Expand Down