Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility Issues Due to astroid API Changes #18

Open
conorcraig opened this issue May 12, 2024 · 0 comments
Open

Compatibility Issues Due to astroid API Changes #18

conorcraig opened this issue May 12, 2024 · 0 comments

Comments

@conorcraig
Copy link

Description

pylint_flask_sqlalchemy v1.0.0 is incompatible with pylint and astroid v3.1.0, causing TypeError due to missing col_offset, parent, end_lineno, and end_col_offset in ClassDef.

Steps to Reproduce

  1. Install pylint and astroid v3.1.0.
  2. Install pylint_flask_sqlalchemy v1.0.0.
  3. Run pylint on a Flask-SQLAlchemy project.
  4. Observe TypeError.

Expected Behavior

The plugin should work without errors.

Actual Behavior

Errors due to missing parameters in ClassDef.

Possible Fix

Update ClassDef instantiation in the plugin:

node.locals[key] = [ClassDef(key, None, 0, node, end_lineno=None, end_col_offset=None)]

Additional Information

  • Dependencies: pylint==3.1.0, astroid==3.1.0, pylint_flask_sqlalchemy==1.0.0
  • PyPi is still serving v0.2.0 of pylint-flask-sqlalchemy and should be updated to point to latest version on Github, not Gitlab
  • A fork at https://github.com/chok/pylint_flask_sqlalchemy/ seems to address the TypeError issues. Consider reviewing changes there for potential inclusion or inspiration for fixes.

Suggested Labels

  • bug
  • compatibility
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

No branches or pull requests

1 participant