Skip to content
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

Fix type definition for Resolver #79

Merged
merged 2 commits into from
Dec 13, 2018
Merged

Conversation

rafalp
Copy link
Contributor

@rafalp rafalp commented Dec 13, 2018

Our current type annotation for Resolver doesn't support resolvers accepting arguments, thus introducing noise to Mypy that resolver function doesn't meet the signature of [Any, GraphQLResolveInfo].

This problem is known to MyPy authors, but in the meantime we should update our Resolver type to be more forgiving so dev tools and code linters don't confuse devs using Ariadne.

This PR changes annotation to Callable[..., Any].

@rafalp rafalp self-assigned this Dec 13, 2018
@rafalp rafalp added the bug Something isn't working label Dec 13, 2018
@rafalp rafalp added this to the 0.2 milestone Dec 13, 2018
@rafalp rafalp force-pushed the fix-resolver-type-definition branch from 6f427aa to 217a999 Compare December 13, 2018 12:18
@codecov
Copy link

codecov bot commented Dec 13, 2018

Codecov Report

Merging #79 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #79   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          37     37           
  Lines        1119   1119           
=====================================
  Hits         1119   1119
Impacted Files Coverage Δ
ariadne/types.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ebb8e7...caa439c. Read the comment docs.

@rafalp rafalp requested a review from salwator December 13, 2018 12:39
@rafalp rafalp requested a review from patrys December 13, 2018 12:43
@rafalp rafalp merged commit c761566 into master Dec 13, 2018
@rafalp rafalp deleted the fix-resolver-type-definition branch December 13, 2018 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants