Skip to content

Update dependencies and other minor changes #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions graphql/error/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ def resolver(context, *_):
formatted_tb = [row[2:] for row in extracted]
formatted_tb = [tb for tb in formatted_tb if tb[0] != "reraise"]

print(formatted_tb)

assert formatted_tb == [
("test_reraise_from_promise", "result.errors[0].reraise()"),
("_resolve_from_executor", "executor(resolve, reject)"),
Expand Down
10 changes: 5 additions & 5 deletions graphql/execution/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def on_resolve(data):
return promise.get()
else:
clean = getattr(exe_context.executor, "clean", None)
if clean:
if callable(clean):
clean()

return promise
Expand All @@ -161,7 +161,7 @@ def execute_operation(
operation, # type: OperationDefinition
root_value, # type: Any
):
# type: (...) -> Union[Dict, Promise[Dict]]
# type: (...) -> Union[Dict, Promise[Dict], Observable]
type = get_operation_root_type(exe_context.schema, operation)
fields = collect_fields(
exe_context, type, operation.selection_set, DefaultOrderedDict(list), set()
Expand Down Expand Up @@ -278,11 +278,11 @@ def on_error(error):
def map_result(data):
# type: (Dict[str, Any]) -> ExecutionResult
if subscriber_exe_context.errors:
result = ExecutionResult(data=data, errors=subscriber_exe_context.errors)
res = ExecutionResult(data=data, errors=subscriber_exe_context.errors)
else:
result = ExecutionResult(data=data)
res = ExecutionResult(data=data)
subscriber_exe_context.reset()
return result
return res

def catch_error(error):
subscriber_exe_context.errors.append(error)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"pytest==4.6.9",
"pytest-django==3.8.0",
"pytest-cov==2.8.1",
"coveralls==1.10.0",
"gevent==1.4.0",
"coveralls==1.11.1",
"gevent>=1.4.0,<1.6",
"six>=1.10.0",
"pytest-benchmark==3.2.3",
"pytest-mock==2.0.0",
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
envlist = py{27,35,36,37,py38,py,py3},pre-commit,mypy,docs

[testenv]
install_command = python -m pip install --ignore-installed --pre {opts} {packages}
deps =
.[test]
commands =
Expand Down