Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mahdyhamad
Copy link
Contributor

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
Copy link

coveralls commented Jan 30, 2023

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

  • 11 of 11 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 91.111%

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

💛 - Coveralls

@erikwrede
Copy link
Member

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
Copy link
Member

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 🙂

@mahdyhamad mahdyhamad force-pushed the fix_type_hints branch 2 times, most recently from a9e9b16 to e4732c2 Compare January 30, 2023 10:26
@mahdyhamad mahdyhamad changed the title fix(providers.py, service.py): properly use type hints fix: properly use type hints Jan 30, 2023
@erikwrede erikwrede merged commit 4fe6404 into graphql-python:main Jan 30, 2023
@erikwrede
Copy link
Member

Thank you! 🙂

@mahdyhamad mahdyhamad deleted the fix_type_hints branch January 30, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants