gwax / pylint-sqlalchemy

pylint plugin to fix incompatibility issues with sqlalchemy
MIT License
4 stars 5 forks source link

Fix AttributeError when using --from-sdtin. #6

Closed adifelice-godaddy closed 1 year ago

adifelice-godaddy commented 1 year ago

Fix for the following exception:

File "/Users/user1/.pyenv/versions/3.9.7/envs/env1/lib/python3.9/site-packages/pylint_sqlalchemy/plugin.py", line 19, in handle_session
    cls.locals[method] = session.locals[method]
AttributeError: 'ImportFrom' object has no attribute 'locals'

Reported: https://github.com/gwax/pylint-sqlalchemy/issues/5

adifelice-godaddy commented 1 year ago

@gwax can you please have a look at this PR? Thanks.