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
|
import re
|
||||||
from graphql_relay import to_global_id
|
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 ...types import ObjectType, Schema, String
|
||||||
from ..node import Node, is_node
|
from ..node import Node, is_node
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from graphql import graphql_sync
|
from graphql import graphql_sync
|
||||||
from graphql.pyutils import dedent
|
|
||||||
|
from graphene.tests.utils import dedent
|
||||||
|
|
||||||
from ...types import Interface, ObjectType, Schema
|
from ...types import Interface, ObjectType, Schema
|
||||||
from ...types.scalars import Int, String
|
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 pytest import raises
|
||||||
|
|
||||||
from graphql.type import GraphQLObjectType, GraphQLSchema
|
from graphene.tests.utils import dedent
|
||||||
from graphql.pyutils import dedent
|
|
||||||
|
|
||||||
from ..field import Field
|
from ..field import Field
|
||||||
from ..objecttype import ObjectType
|
from ..objecttype import ObjectType
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -82,7 +82,7 @@ setup(
|
||||||
keywords="api graphql protocol rest relay graphene",
|
keywords="api graphql protocol rest relay graphene",
|
||||||
packages=find_packages(exclude=["examples*"]),
|
packages=find_packages(exclude=["examples*"]),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"graphql-core>=3.1.1,<4",
|
"graphql-core>=3.1.2,<4",
|
||||||
"graphql-relay>=3.0,<4",
|
"graphql-relay>=3.0,<4",
|
||||||
"aniso8601>=8,<9",
|
"aniso8601>=8,<9",
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user