From fb802615f701e45aa166d1420ff9474683d27121 Mon Sep 17 00:00:00 2001 From: lilac-supernova-2 <143229315+lilac-supernova-2@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:37:41 -0400 Subject: [PATCH 1/4] Fix Star Wars spaceship name --- examples/starwars/data.py | 2 +- examples/starwars/tests/test_mutation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/starwars/data.py b/examples/starwars/data.py index 6bdbf579c..bfac78b19 100644 --- a/examples/starwars/data.py +++ b/examples/starwars/data.py @@ -28,7 +28,7 @@ def initialize(): # Yeah, technically it's Corellian. But it flew in the service of the rebels, # so for the purposes of this demo it's a rebel ship. - falcon = Ship(id="4", name="Millenium Falcon", faction=rebels) + falcon = Ship(id="4", name="Millennium Falcon", faction=rebels) falcon.save() homeOne = Ship(id="5", name="Home One", faction=rebels) diff --git a/examples/starwars/tests/test_mutation.py b/examples/starwars/tests/test_mutation.py index e24bf8ae1..46b8fc351 100644 --- a/examples/starwars/tests/test_mutation.py +++ b/examples/starwars/tests/test_mutation.py @@ -40,7 +40,7 @@ def test_mutations(): {"node": {"id": "U2hpcDox", "name": "X-Wing"}}, {"node": {"id": "U2hpcDoy", "name": "Y-Wing"}}, {"node": {"id": "U2hpcDoz", "name": "A-Wing"}}, - {"node": {"id": "U2hpcDo0", "name": "Millenium Falcon"}}, + {"node": {"id": "U2hpcDo0", "name": "Millennium Falcon"}}, {"node": {"id": "U2hpcDo1", "name": "Home One"}}, {"node": {"id": "U2hpcDo5", "name": "Peter"}}, ] From cd4dfa83f4b3a9d87eb16cab0faae92c6d025754 Mon Sep 17 00:00:00 2001 From: lilac-supernova-2 <143229315+lilac-supernova-2@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:43:09 -0400 Subject: [PATCH 2/4] Fix some typos in comments --- graphene_django/filter/tests/conftest.py | 2 +- graphene_django/filter/utils.py | 2 +- graphene_django/forms/types.py | 4 ++-- graphene_django/tests/models.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/graphene_django/filter/tests/conftest.py b/graphene_django/filter/tests/conftest.py index 9f5d36667..a4097b183 100644 --- a/graphene_django/filter/tests/conftest.py +++ b/graphene_django/filter/tests/conftest.py @@ -44,7 +44,7 @@ class Meta: "name": ["exact", "contains"], } - # Those are actually usable with our Query fixture bellow + # Those are actually usable with our Query fixture below tags__contains = ArrayFilter(field_name="tags", lookup_expr="contains") tags__overlap = ArrayFilter(field_name="tags", lookup_expr="overlap") tags = ArrayFilter(field_name="tags", lookup_expr="exact") diff --git a/graphene_django/filter/utils.py b/graphene_django/filter/utils.py index 3dd835fc3..339bd48f9 100644 --- a/graphene_django/filter/utils.py +++ b/graphene_django/filter/utils.py @@ -43,7 +43,7 @@ def get_filtering_args_from_filterset(filterset_class, type): isinstance(filter_field, TypedFilter) and filter_field.input_type is not None ): - # First check if the filter input type has been explicitely given + # First check if the filter input type has been explicitly given field_type = filter_field.input_type else: if name not in filterset_class.declared_filters or isinstance( diff --git a/graphene_django/forms/types.py b/graphene_django/forms/types.py index b370afd84..0e311e5d6 100644 --- a/graphene_django/forms/types.py +++ b/graphene_django/forms/types.py @@ -4,7 +4,7 @@ from graphene.utils.str_converters import to_camel_case from ..converter import BlankValueField -from ..types import ErrorType # noqa Import ErrorType for backwards compatability +from ..types import ErrorType # noqa Import ErrorType for backwards compatibility from .mutation import fields_for_form @@ -60,7 +60,7 @@ def mutate(_root, _info, data): and isinstance(object_type._meta.fields[name], BlankValueField) ): # Field type BlankValueField here means that field - # with choises have been converted to enum + # with choices have been converted to enum # (BlankValueField is using only for that task ?) setattr(cls, name, cls.get_enum_cnv_cls_instance(name, object_type)) elif ( diff --git a/graphene_django/tests/models.py b/graphene_django/tests/models.py index 4afbbbce7..67e266731 100644 --- a/graphene_django/tests/models.py +++ b/graphene_django/tests/models.py @@ -97,7 +97,7 @@ class Meta: class APNewsReporter(Reporter): """ - This class only inherits from Reporter for testing multi table inheritence + This class only inherits from Reporter for testing multi table inheritance similar to what you'd see in django-polymorphic """ From f027834827eb139bcd4f87c68e89ffaf080848fe Mon Sep 17 00:00:00 2001 From: lilac-supernova-2 <143229315+lilac-supernova-2@users.noreply.github.com> Date: Sat, 26 Aug 2023 02:31:00 -0400 Subject: [PATCH 3/4] Typo fixes --- graphene_django/filter/tests/test_fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphene_django/filter/tests/test_fields.py b/graphene_django/filter/tests/test_fields.py index df3b97acb..b9c8df465 100644 --- a/graphene_django/filter/tests/test_fields.py +++ b/graphene_django/filter/tests/test_fields.py @@ -789,7 +789,7 @@ class Query(ObjectType): query = """ query NodeFilteringQuery { - allReporters(orderBy: "-firtsnaMe") { + allReporters(orderBy: "-firstname") { edges { node { firstName @@ -802,7 +802,7 @@ class Query(ObjectType): assert result.errors -def test_order_by_is_perserved(): +def test_order_by_is_preserved(): class ReporterType(DjangoObjectType): class Meta: model = Reporter From aa800c8c0e53dda8eafd8d62cf1f7f91b504f037 Mon Sep 17 00:00:00 2001 From: lilac-supernova-2 <143229315+lilac-supernova-2@users.noreply.github.com> Date: Sat, 26 Aug 2023 02:31:17 -0400 Subject: [PATCH 4/4] More typo fixes --- docs/settings.rst | 2 +- examples/cookbook/dummy_data.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index d38d0c9c8..20cf04100 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -6,7 +6,7 @@ Graphene-Django can be customised using settings. This page explains each settin Usage ----- -Add settings to your Django project by creating a Dictonary with name ``GRAPHENE`` in the project's ``settings.py``: +Add settings to your Django project by creating a Dictionary with name ``GRAPHENE`` in the project's ``settings.py``: .. code:: python diff --git a/examples/cookbook/dummy_data.json b/examples/cookbook/dummy_data.json index c585bfcdf..c661846c2 100644 --- a/examples/cookbook/dummy_data.json +++ b/examples/cookbook/dummy_data.json @@ -231,7 +231,7 @@ "fields": { "category": 3, "name": "Newt", - "notes": "Braised and Confuesd" + "notes": "Braised and Confused" }, "model": "ingredients.ingredient", "pk": 5