graphql-python / graphene-federation

Federation implementation for Graphene.
MIT License
40 stars 10 forks source link

fix: properly use type hints #10

Closed mahdyhamad closed 1 year ago

mahdyhamad commented 1 year ago

Description:

Python throws the TypeError: object is not subscriptable if you use indexing with the square bracket notation on an object that is not indexable.

To solve this issue, indexed types is used

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4042446135

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 3782172909: 0.04%
Covered Lines: 205
Relevant Lines: 225

💛 - Coveralls
erikwrede commented 1 year ago

Good catch! We should keep the 3.6-style type hints for list and dict until 3.10 is the oldest supported python version.

erikwrede commented 1 year ago

Can you fix the other affected files in the PR as well? It makes little sense to push a release that only supports half of that. If you have time, I can release it right after that 🙂

erikwrede commented 1 year ago

Thank you! 🙂