Skip to content

Commit a8c113b

Browse files
committed
chore: fix typos and snake_case starwars example locals
- examples/starwars/data.py: rename camelCase locals (homeOne, tieFighter, tieInterceptor) to snake_case to match Python style. - graphene_django/filter/utils.py: fix "Graphql" -> "GraphQL" in the get_field_type docstring and "no explicitly declared" -> "not explicitly declared" inline comment. Other typo fixes from PR graphql-python#1457 (Dictonary, Confuesd, Millenium, firtsnaMe, perserved, compatability, choises, inheritence, bellow) were already merged into main since 2023 via the follow-up PR graphql-python#1459. Made-with: Cursor
1 parent f02ea33 commit a8c113b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/starwars/data.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ def initialize():
3131
falcon = Ship(id="4", name="Millennium Falcon", faction=rebels)
3232
falcon.save()
3333

34-
homeOne = Ship(id="5", name="Home One", faction=rebels)
35-
homeOne.save()
34+
home_one = Ship(id="5", name="Home One", faction=rebels)
35+
home_one.save()
3636

37-
tieFighter = Ship(id="6", name="TIE Fighter", faction=empire)
38-
tieFighter.save()
37+
tie_fighter = Ship(id="6", name="TIE Fighter", faction=empire)
38+
tie_fighter.save()
3939

40-
tieInterceptor = Ship(id="7", name="TIE Interceptor", faction=empire)
41-
tieInterceptor.save()
40+
tie_interceptor = Ship(id="7", name="TIE Interceptor", faction=empire)
41+
tie_interceptor.save()
4242

4343
executor = Ship(id="8", name="Executor", faction=empire)
4444
executor.save()

graphene_django/filter/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def get_field_type(registry, model, field_name):
1212
"""
13-
Try to get a model field corresponding Graphql type from the DjangoObjectType.
13+
Try to get a model field corresponding GraphQL type from the DjangoObjectType.
1414
"""
1515
object_type = registry.get_type_for_model(model)
1616
if object_type:
@@ -49,7 +49,7 @@ def get_filtering_args_from_filterset(filterset_class, type):
4949
if name not in filterset_class.declared_filters or isinstance(
5050
filter_field, TypedFilter
5151
):
52-
# Get the filter field for filters that are no explicitly declared.
52+
# Get the filter field for filters that are not explicitly declared.
5353
if filter_type == "isnull":
5454
field_type = graphene.Boolean
5555
else:

0 commit comments

Comments
 (0)