Skip to content

Commit a554b98

Browse files
author
Daniel Gallagher
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4787cdc + 034b538 commit a554b98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+66
-56
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ trim_trailing_whitespace = true
1111
[*.{py,rst,ini}]
1212
indent_style = space
1313
indent_size = 4
14-

.isort.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
known_third_party = aniso8601,graphql,graphql_relay,promise,pytest,pytz,pyutils,setuptools,six,snapshottest,sphinx_graphene_theme

.pre-commit-config.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
repos:
12
- repo: git://github.com/pre-commit/pre-commit-hooks
2-
sha: v0.8.0
3+
rev: v1.2.3
34
hooks:
45
- id: autopep8-wrapper
56
args:
@@ -15,3 +16,11 @@
1516
- id: pretty-format-json
1617
args:
1718
- --autofix
19+
- repo: https://github.com/asottile/seed-isort-config
20+
rev: v1.0.0
21+
hooks:
22+
- id: seed-isort-config
23+
- repo: https://github.com/pre-commit/mirrors-isort
24+
rev: v4.3.4
25+
hooks:
26+
- id: isort

UPGRADE-v2.0.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Before:
207207
```python
208208
class SomeMutation(Mutation):
209209
...
210-
210+
211211
@classmethod
212212
def mutate(cls, instance, args, context, info):
213213
...
@@ -218,7 +218,7 @@ With 2.0:
218218
```python
219219
class SomeMutation(Mutation):
220220
...
221-
221+
222222
def mutate(self, info, **args):
223223
...
224224
```
@@ -231,7 +231,7 @@ class SomeMutation(Mutation):
231231
first_name = String(required=True)
232232
last_name = String(required=True)
233233
...
234-
234+
235235
def mutate(self, info, first_name, last_name):
236236
...
237237
```
@@ -250,7 +250,7 @@ If you are using Middelwares, you need to some adjustments:
250250
Before:
251251

252252
```python
253-
class MyGrapheneMiddleware(object):
253+
class MyGrapheneMiddleware(object):
254254
def resolve(self, next_mw, root, args, context, info):
255255

256256
## Middleware code
@@ -261,7 +261,7 @@ class MyGrapheneMiddleware(object):
261261
With 2.0:
262262

263263
```python
264-
class MyGrapheneMiddleware(object):
264+
class MyGrapheneMiddleware(object):
265265
def resolve(self, next_mw, root, info, **args):
266266
context = info.context
267267

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import sphinx_graphene_theme
23

34
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
45

@@ -136,7 +137,6 @@
136137
# html_theme = 'alabaster'
137138
# if on_rtd:
138139
# html_theme = 'sphinx_rtd_theme'
139-
import sphinx_graphene_theme
140140

141141
html_theme = "sphinx_graphene_theme"
142142

docs/execution/dataloader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Naively, if ``me``, ``bestFriend`` and ``friends`` each need to request the back
8888
there could be at most 13 database requests!
8989

9090

91-
When using DataLoader, we could define the User type using our previous example with
91+
When using DataLoader, we could define the User type using our previous example with
9292
leaner code and at most 4 database requests, and possibly fewer if there are cache hits.
9393

9494

docs/relay/mutations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Mutations can also accept files, that's how it will work with different integrat
4141
class Input:
4242
pass
4343
# nothing needed for uploading file
44-
44+
4545
# your return fields
4646
success = graphene.String()
4747

docs/testing/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Here is a simple example on how our tests will look if we use ``pytest``:
101101
If we are using ``unittest``:
102102

103103
.. code:: python
104-
104+
105105
from snapshottest import TestCase
106106
107107
class APITestCase(TestCase):

examples/starwars/tests/snapshots/snap_test_query.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from snapshottest import Snapshot
66

7-
87
snapshots = Snapshot()
98

109
snapshots['test_hero_name_query 1'] = {

examples/starwars_relay/tests/snapshots/snap_test_connections.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from snapshottest import Snapshot
66

7-
87
snapshots = Snapshot()
98

109
snapshots['test_correct_fetch_first_ship_rebels 1'] = {

0 commit comments

Comments
 (0)