Skip to content

Commit

Permalink
Format with black
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Dec 14, 2023
1 parent 1cc9106 commit 6f1f4da
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ariadne/enums_default_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


def validate_schema_default_enum_values(schema: GraphQLSchema) -> None:
"""Raises `ValueError` if GraphQL schema has input fields or arguments with
"""Raises `ValueError` if GraphQL schema has input fields or arguments with
default values that are undefined enum values.
# Example schema with invalid field argument
Expand Down Expand Up @@ -119,12 +119,12 @@ def visit_ast_enum_default_value(
def repair_schema_default_enum_values(schema: GraphQLSchema) -> None:
"""Repairs Python values of default enums embedded in the GraphQL schema.
Default enum values in the GraphQL schemas are represented as strings with enum
member names in Python. Assigning custom Python values to members of the
Default enum values in the GraphQL schemas are represented as strings with enum
member names in Python. Assigning custom Python values to members of the
`GraphQLEnumType` doesn't change those defaults.
This function walks the GraphQL schema, finds default enum values strings and,
if this string is a valid GraphQL member name, swaps it out for a valid Python
This function walks the GraphQL schema, finds default enum values strings and,
if this string is a valid GraphQL member name, swaps it out for a valid Python
value.
"""
GraphQLSchemaEnumsValuesRepairVisitor(schema)
Expand Down

0 comments on commit 6f1f4da

Please sign in to comment.