mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-22 13:59:51 +03:00
Use custom dedent function and pin graphql-core to >3.1.2
This commit is contained in:
parent
9f28d2fde4
commit
1d3525e6f9
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
from graphql_relay import to_global_id
|
||||
|
||||
from graphql.pyutils import dedent
|
||||
from graphene.tests.utils import dedent
|
||||
|
||||
from ...types import ObjectType, Schema, String
|
||||
from ..node import Node, is_node
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from graphql import graphql_sync
|
||||
from graphql.pyutils import dedent
|
||||
|
||||
from graphene.tests.utils import dedent
|
||||
|
||||
from ...types import Interface, ObjectType, Schema
|
||||
from ...types.scalars import Int, String
|
||||
|
|
9
graphene/tests/utils.py
Normal file
9
graphene/tests/utils.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from textwrap import dedent as _dedent
|
||||
|
||||
|
||||
def dedent(text: str) -> str:
|
||||
"""Fix indentation of given text by removing leading spaces and tabs.
|
||||
Also removes leading newlines and trailing spaces and tabs, but keeps trailing
|
||||
newlines.
|
||||
"""
|
||||
return _dedent(text.lstrip("\n").rstrip(" \t"))
|
|
@ -1,7 +1,7 @@
|
|||
from graphql.type import GraphQLObjectType, GraphQLSchema
|
||||
from pytest import raises
|
||||
|
||||
from graphql.type import GraphQLObjectType, GraphQLSchema
|
||||
from graphql.pyutils import dedent
|
||||
from graphene.tests.utils import dedent
|
||||
|
||||
from ..field import Field
|
||||
from ..objecttype import ObjectType
|
||||
|
|
Loading…
Reference in New Issue
Block a user