Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
leszekhanusz committed Nov 19, 2023
1 parent 10e0f35 commit 9d068ad
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions gql/dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,15 +1075,19 @@ def executable_ast(self) -> FragmentDefinitionNode:
graphql-core if the Parser is initialized with:
allow_legacy_fragment_variables=True.
We will set variable_definitions to None instead of an empty tuple to be
coherent with how it works by default on graphql-core.
We will not provide variable_definitions instead of providing an empty
tuple to be coherent with how it works by default on graphql-core.
"""
fragment_variable_definitions = None
variable_definition_kwargs = {}
else:
variable_definition_kwargs = {

Check warning on line 1083 in gql/dsl.py

View check run for this annotation

Codecov / codecov/patch

gql/dsl.py#L1083

Added line #L1083 was not covered by tests
"variable_definitions": fragment_variable_definitions
}

return FragmentDefinitionNode(
type_condition=NamedTypeNode(name=NameNode(value=self._type.name)),
selection_set=self.selection_set,
variable_definitions=fragment_variable_definitions,
**variable_definition_kwargs,
name=NameNode(value=self.name),
directives=(),
)
Expand Down

0 comments on commit 9d068ad

Please sign in to comment.