You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use the full capability of mypy while using neo4j.
However, neo4j driver is not annotated for that purpose.
One gets
example.py:4: error: Skipping analyzing 'neo4j': found module but no type hints or library stubs
example.py:4: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
Adding # type: ignore after the import from neo4j import GraphDatabase as suggested on the provided html page only partly solves the problem.
I no longer am able to use the flag --disallow-any-expr on my complete archive.
On all neo4j related lines I now get:
example.py:17: error: Expression has type "Any"
example.py:19: error: Expression has type "Any"
example.py:22: error: Expression has type "Any"
example.py:30: error: Expression has type "Any"
example.py:31: error: Expression has type "Any"
example.py:33: error: Expression has type "Any"
example.py:35: error: Expression has type "Any"
So please add type annotations to the neo4j driver: I expect that it will prevent many subtle error in my and other user's code.
For me working with untyped graphs feels like walking a tight rope without a safety net!
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion. I've added the idea to our internal Trello wall. I can't promise that it will happen, though. Definitely not in the near future as other things have higher priority right now.
Uh oh!
There was an error while loading. Please reload this page.
I would like to use the full capability of mypy while using neo4j.
However, neo4j driver is not annotated for that purpose.
One gets
Adding
# type: ignore
after the importfrom neo4j import GraphDatabase
as suggested on the provided html page only partly solves the problem.I no longer am able to use the flag
--disallow-any-expr
on my complete archive.On all neo4j related lines I now get:
So please add type annotations to the neo4j driver: I expect that it will prevent many subtle error in my and other user's code.
For me working with untyped graphs feels like walking a tight rope without a safety net!
The text was updated successfully, but these errors were encountered: