graphql-python / graphql-core-legacy

GraphQL base implementation for Python (legacy version – see graphql-core for the current one)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mypy reports invalid syntax with validators/rules/overlapping_fields_can_be_merged.py:344

achimnol opened this issue · comments

The line 344 and 345 in overlapping_fields_can_be_merged.py causes mypy 0.761 to report invalid syntax error during type checks.

My program with graphql-core runs just fine at runtime and in fact those lines are in a valid Python syntax though look strange (orphaned expressions).

But I think if they aren't intended codes, then I'd like to suggest to fix them.

Here is the CI report link.

This might be related to python/mypy#8218.

Thank you for reporting this @achimnol. I believe these two lines have been accidentally copied into the code when Syrus added the type hints, since these serve no purpose as you already noticed.

I have removed the lines now completely. Interestingly, they were not detected by our CI. I found the difference was that your CI is using Python 3.8 and ours Python 3.7. It seems mypy behaves differently depending on the Python version.

Would it be possible to get a release of this please 🙏

And thanks so much for resolving so quickly!

New release 2.3.1 with this and a few other minor fixes is out now. 😄

Thanks!