Skip to content

Commit e37ef00

Browse files
committed
Update test and dev environment
1 parent 03277a5 commit e37ef00

File tree

7 files changed

+27
-27
lines changed

7 files changed

+27
-27
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.1.0
6+
rev: v4.2.0
77
hooks:
88
- id: check-merge-conflict
99
- id: check-json
@@ -17,11 +17,11 @@ repos:
1717
- id: trailing-whitespace
1818
exclude: README.md
1919
- repo: https://github.com/asottile/pyupgrade
20-
rev: v2.31.0
20+
rev: v2.32.1
2121
hooks:
2222
- id: pyupgrade
2323
- repo: https://github.com/ambv/black
24-
rev: 21.12b0
24+
rev: 22.3.0
2525
hooks:
2626
- id: black
2727
- repo: https://github.com/PyCQA/flake8

docs/conf.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@
6464
master_doc = "index"
6565

6666
# General information about the project.
67-
project = u"Graphene"
68-
copyright = u"Graphene 2016"
69-
author = u"Syrus Akbary"
67+
project = "Graphene"
68+
copyright = "Graphene 2016"
69+
author = "Syrus Akbary"
7070

7171
# The version info for the project you're documenting, acts as replacement for
7272
# |version| and |release|, also used in various other places throughout the
7373
# built documents.
7474
#
7575
# The short X.Y version.
76-
version = u"1.0"
76+
version = "1.0"
7777
# The full version, including alpha/beta/rc tags.
78-
release = u"1.0"
78+
release = "1.0"
7979

8080
# The language for content autogenerated by Sphinx. Refer to documentation
8181
# for a list of supported languages.
@@ -278,7 +278,7 @@
278278
# (source start file, target name, title,
279279
# author, documentclass [howto, manual, or own class]).
280280
latex_documents = [
281-
(master_doc, "Graphene.tex", u"Graphene Documentation", u"Syrus Akbary", "manual")
281+
(master_doc, "Graphene.tex", "Graphene Documentation", "Syrus Akbary", "manual")
282282
]
283283

284284
# The name of an image file (relative to this directory) to place at the top of
@@ -318,7 +318,7 @@
318318

319319
# One entry per manual page. List of tuples
320320
# (source start file, name, description, authors, manual section).
321-
man_pages = [(master_doc, "graphene", u"Graphene Documentation", [author], 1)]
321+
man_pages = [(master_doc, "graphene", "Graphene Documentation", [author], 1)]
322322

323323
# If true, show URL addresses after external links.
324324
#
@@ -334,7 +334,7 @@
334334
(
335335
master_doc,
336336
"Graphene",
337-
u"Graphene Documentation",
337+
"Graphene Documentation",
338338
author,
339339
"Graphene",
340340
"One line description of project.",

graphene/types/scalars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class String(Scalar):
143143
@staticmethod
144144
def coerce_string(value):
145145
if isinstance(value, bool):
146-
return u"true" if value else u"false"
146+
return "true" if value else "false"
147147
return str(value)
148148

149149
serialize = coerce_string

graphene/types/tests/test_scalar.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ class JSONScalar(Scalar):
1111

1212

1313
def test_ints():
14-
assert Int.parse_value(2 ** 31 - 1) is not None
14+
assert Int.parse_value(2**31 - 1) is not None
1515
assert Int.parse_value("2.0") is not None
16-
assert Int.parse_value(2 ** 31) is None
16+
assert Int.parse_value(2**31) is None
1717

18-
assert Int.parse_literal(IntValueNode(value=str(2 ** 31 - 1))) == 2 ** 31 - 1
19-
assert Int.parse_literal(IntValueNode(value=str(2 ** 31))) is None
18+
assert Int.parse_literal(IntValueNode(value=str(2**31 - 1))) == 2**31 - 1
19+
assert Int.parse_literal(IntValueNode(value=str(2**31))) is None
2020

21-
assert Int.parse_value(-(2 ** 31)) is not None
22-
assert Int.parse_value(-(2 ** 31) - 1) is None
21+
assert Int.parse_value(-(2**31)) is not None
22+
assert Int.parse_value(-(2**31) - 1) is None
2323

24-
assert BigInt.parse_value(2 ** 31) is not None
24+
assert BigInt.parse_value(2**31) is not None
2525
assert BigInt.parse_value("2.0") is not None
26-
assert BigInt.parse_value(-(2 ** 31) - 1) is not None
26+
assert BigInt.parse_value(-(2**31) - 1) is not None
2727

28-
assert BigInt.parse_literal(IntValueNode(value=str(2 ** 31 - 1))) == 2 ** 31 - 1
29-
assert BigInt.parse_literal(IntValueNode(value=str(2 ** 31))) == 2 ** 31
28+
assert BigInt.parse_literal(IntValueNode(value=str(2**31 - 1))) == 2**31 - 1
29+
assert BigInt.parse_literal(IntValueNode(value=str(2**31))) == 2**31

graphene/types/tests/test_scalars_serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_serializes_output_string():
3838
assert String.serialize(-1.1) == "-1.1"
3939
assert String.serialize(True) == "true"
4040
assert String.serialize(False) == "false"
41-
assert String.serialize(u"\U0001F601") == u"\U0001F601"
41+
assert String.serialize("\U0001F601") == "\U0001F601"
4242

4343

4444
def test_serializes_output_boolean():

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ def run_tests(self):
5353
"snapshottest>=0.6,<1",
5454
"coveralls>=3.3,<4",
5555
"promise>=2.3,<3",
56-
"mock>=4.0,<5",
57-
"pytz==2021.3",
56+
"mock>=4,<5",
57+
"pytz==2022.1",
5858
"iso8601>=1,<2",
5959
]
6060

61-
dev_requires = ["black==19.10b0", "flake8>=3.7,<4"] + tests_require
61+
dev_requires = ["black==22.3.0", "flake8>=4,<5"] + tests_require
6262

6363
setup(
6464
name="graphene",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ commands =
2222
[testenv:mypy]
2323
basepython = python3.9
2424
deps =
25-
mypy>=0.931,<1
25+
mypy>=0.950,<1
2626
commands =
2727
mypy graphene
2828

0 commit comments

Comments
 (0)