mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-24 18:44:08 +03:00
9a773b9d7b
* Use ruff in pre-commit * Add pyupgrade * Add isort * Add bugbear * Fix B015 Pointless comparison * Fix B026 * B018 false positive * Remove flake8 and isort config from setup.cfg * Remove black and flake8 from dev dependencies * Update black * Show list of fixes applied with autofix on * Fix typo * Add C4 flake8-comprehensions * Add ruff to dev dependencies * Fix up
18 lines
376 B
Python
18 lines
376 B
Python
from graphene import Field
|
|
from graphene_django.forms.mutation import DjangoFormMutation, DjangoModelFormMutation
|
|
|
|
from .forms import PetForm
|
|
from .types import PetType
|
|
|
|
|
|
class PetFormMutation(DjangoFormMutation):
|
|
class Meta:
|
|
form_class = PetForm
|
|
|
|
|
|
class PetMutation(DjangoModelFormMutation):
|
|
pet = Field(PetType)
|
|
|
|
class Meta:
|
|
form_class = PetForm
|