Skip to content

Commit

Permalink
Merge pull request #31 from devind-team/28-wrong-typing-for-the-advan…
Browse files Browse the repository at this point in the history
…ceddjangofilterconnectionfield-constructor

28 wrong typing for the advanceddjangofilterconnectionfield constructor
  • Loading branch information
Victor authored Mar 31, 2022
2 parents 8bdac29 + a4ee623 commit 91773f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ per-file-ignores =
test_filterset.py:N802
filters.py:A003
0001_initial.py:D100,D101,D104
ignore = ANN002,ANN003,ANN101,ANN102,D106,D107
ignore = ANN002,ANN003,ANN401,ANN101,ANN102,D106,D107

import-order-style = pycharm
dictionaries=en_US,python,technical,django
4 changes: 2 additions & 2 deletions graphene_django_filter/connection_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module instead of the `DjangoFilterConnectionField` from graphene-django.
"""

from typing import Any, Dict, Iterable, Optional, Type
from typing import Any, Callable, Dict, Iterable, Optional, Type, Union

import graphene
from django.core.exceptions import ValidationError
Expand All @@ -24,7 +24,7 @@ class AdvancedDjangoFilterConnectionField(DjangoFilterConnectionField):

def __init__(
self,
type: Type[DjangoObjectType],
type: Union[Type[DjangoObjectType], Callable[[], Type[DjangoObjectType]], str],
fields: Optional[Dict[str, list]] = None,
order_by: Any = None,
extra_filter_meta: Optional[dict] = None,
Expand Down

0 comments on commit 91773f0

Please sign in to comment.