mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-22 01:26:49 +03:00
Update test and dev environment
This commit is contained in:
parent
03277a5512
commit
e37ef00ca4
|
@ -3,7 +3,7 @@ default_language_version:
|
|||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.1.0
|
||||
rev: v4.2.0
|
||||
hooks:
|
||||
- id: check-merge-conflict
|
||||
- id: check-json
|
||||
|
@ -17,11 +17,11 @@ repos:
|
|||
- id: trailing-whitespace
|
||||
exclude: README.md
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.31.0
|
||||
rev: v2.32.1
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: 21.12b0
|
||||
rev: 22.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
|
|
16
docs/conf.py
16
docs/conf.py
|
@ -64,18 +64,18 @@ source_suffix = ".rst"
|
|||
master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = u"Graphene"
|
||||
copyright = u"Graphene 2016"
|
||||
author = u"Syrus Akbary"
|
||||
project = "Graphene"
|
||||
copyright = "Graphene 2016"
|
||||
author = "Syrus Akbary"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = u"1.0"
|
||||
version = "1.0"
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = u"1.0"
|
||||
release = "1.0"
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -278,7 +278,7 @@ latex_elements = {
|
|||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, "Graphene.tex", u"Graphene Documentation", u"Syrus Akbary", "manual")
|
||||
(master_doc, "Graphene.tex", "Graphene Documentation", "Syrus Akbary", "manual")
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
|
@ -318,7 +318,7 @@ latex_documents = [
|
|||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [(master_doc, "graphene", u"Graphene Documentation", [author], 1)]
|
||||
man_pages = [(master_doc, "graphene", "Graphene Documentation", [author], 1)]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#
|
||||
|
@ -334,7 +334,7 @@ texinfo_documents = [
|
|||
(
|
||||
master_doc,
|
||||
"Graphene",
|
||||
u"Graphene Documentation",
|
||||
"Graphene Documentation",
|
||||
author,
|
||||
"Graphene",
|
||||
"One line description of project.",
|
||||
|
|
|
@ -143,7 +143,7 @@ class String(Scalar):
|
|||
@staticmethod
|
||||
def coerce_string(value):
|
||||
if isinstance(value, bool):
|
||||
return u"true" if value else u"false"
|
||||
return "true" if value else "false"
|
||||
return str(value)
|
||||
|
||||
serialize = coerce_string
|
||||
|
|
|
@ -11,19 +11,19 @@ def test_scalar():
|
|||
|
||||
|
||||
def test_ints():
|
||||
assert Int.parse_value(2 ** 31 - 1) is not None
|
||||
assert Int.parse_value(2**31 - 1) is not None
|
||||
assert Int.parse_value("2.0") is not None
|
||||
assert Int.parse_value(2 ** 31) is None
|
||||
assert Int.parse_value(2**31) is None
|
||||
|
||||
assert Int.parse_literal(IntValueNode(value=str(2 ** 31 - 1))) == 2 ** 31 - 1
|
||||
assert Int.parse_literal(IntValueNode(value=str(2 ** 31))) is None
|
||||
assert Int.parse_literal(IntValueNode(value=str(2**31 - 1))) == 2**31 - 1
|
||||
assert Int.parse_literal(IntValueNode(value=str(2**31))) is None
|
||||
|
||||
assert Int.parse_value(-(2 ** 31)) is not None
|
||||
assert Int.parse_value(-(2 ** 31) - 1) is None
|
||||
assert Int.parse_value(-(2**31)) is not None
|
||||
assert Int.parse_value(-(2**31) - 1) is None
|
||||
|
||||
assert BigInt.parse_value(2 ** 31) is not None
|
||||
assert BigInt.parse_value(2**31) is not None
|
||||
assert BigInt.parse_value("2.0") is not None
|
||||
assert BigInt.parse_value(-(2 ** 31) - 1) is not None
|
||||
assert BigInt.parse_value(-(2**31) - 1) is not None
|
||||
|
||||
assert BigInt.parse_literal(IntValueNode(value=str(2 ** 31 - 1))) == 2 ** 31 - 1
|
||||
assert BigInt.parse_literal(IntValueNode(value=str(2 ** 31))) == 2 ** 31
|
||||
assert BigInt.parse_literal(IntValueNode(value=str(2**31 - 1))) == 2**31 - 1
|
||||
assert BigInt.parse_literal(IntValueNode(value=str(2**31))) == 2**31
|
||||
|
|
|
@ -38,7 +38,7 @@ def test_serializes_output_string():
|
|||
assert String.serialize(-1.1) == "-1.1"
|
||||
assert String.serialize(True) == "true"
|
||||
assert String.serialize(False) == "false"
|
||||
assert String.serialize(u"\U0001F601") == u"\U0001F601"
|
||||
assert String.serialize("\U0001F601") == "\U0001F601"
|
||||
|
||||
|
||||
def test_serializes_output_boolean():
|
||||
|
|
6
setup.py
6
setup.py
|
@ -53,12 +53,12 @@ tests_require = [
|
|||
"snapshottest>=0.6,<1",
|
||||
"coveralls>=3.3,<4",
|
||||
"promise>=2.3,<3",
|
||||
"mock>=4.0,<5",
|
||||
"pytz==2021.3",
|
||||
"mock>=4,<5",
|
||||
"pytz==2022.1",
|
||||
"iso8601>=1,<2",
|
||||
]
|
||||
|
||||
dev_requires = ["black==19.10b0", "flake8>=3.7,<4"] + tests_require
|
||||
dev_requires = ["black==22.3.0", "flake8>=4,<5"] + tests_require
|
||||
|
||||
setup(
|
||||
name="graphene",
|
||||
|
|
Loading…
Reference in New Issue
Block a user