This works as documented:
with driver.session() as session:
but my linter throws an error on this:
session = driver.session()
> Assigning result of a function call, where the function has no returnpylint(assignment-from-no-return)
I thought that with
was just a syntax sugar to handle closing handles etc.
Note that the code itself will run but the linter errors are really distracting. Is there a way to fix the original codes such that
I'm trying to get a session object to use for multiple transactions (or the lifetime of my app)
https://neo4j.com/docs/api/python-driver/current/driver.html#neo4j.Driver.session
source is here https://github.com/neo4j/neo4j-python-driver