mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-26 19:43:56 +03:00
Flake8 fixes
This commit is contained in:
parent
eb665d569d
commit
bfd43bc995
|
@ -1,5 +1,5 @@
|
||||||
try:
|
try:
|
||||||
import django_filters
|
import django_filters # noqa
|
||||||
except:
|
except:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"Use of django filtering requires the django-filter package "
|
"Use of django filtering requires the django-filter package "
|
||||||
|
|
|
@ -29,9 +29,12 @@ class DjangoObjectTypeMeta(ObjectTypeMeta):
|
||||||
# We skip this field if we specify only_fields and is not
|
# We skip this field if we specify only_fields and is not
|
||||||
# in there. Or when we exclude this field in exclude_fields
|
# in there. Or when we exclude this field in exclude_fields
|
||||||
continue
|
continue
|
||||||
converted_field = convert_django_field(field)
|
converted_field = cls.convert_django_field(field)
|
||||||
cls.add_to_class(field.name, converted_field)
|
cls.add_to_class(field.name, converted_field)
|
||||||
|
|
||||||
|
def convert_django_field(cls, field):
|
||||||
|
return convert_django_field(field)
|
||||||
|
|
||||||
def construct(cls, *args, **kwargs):
|
def construct(cls, *args, **kwargs):
|
||||||
cls = super(DjangoObjectTypeMeta, cls).construct(*args, **kwargs)
|
cls = super(DjangoObjectTypeMeta, cls).construct(*args, **kwargs)
|
||||||
if not cls._meta.abstract:
|
if not cls._meta.abstract:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user