pylint-flask-sqlalchemy

raw JSON →
0.2.0 verified Fri May 01 auth: no python maintenance

A Pylint plugin that improves code analysis for Flask-SQLAlchemy by teaching Pylint about SQLAlchemy's dynamic attributes and relationships. Version 0.2.0 is the latest. Low release cadence, last updated in 2018.

pip install pylint-flask-sqlalchemy
error Module 'pylint_flask_sqlalchemy' not found
cause Plugin not installed or incorrect import path.
fix
Run pip install pylint-flask-sqlalchemy and ensure the package is in your Python path.
error E: 10, 0: Instance of 'User' has no 'name' member (no-member)
cause Pylint not recognizing SQLAlchemy columns.
fix
Load the plugin via .pylintrc or command line: --load-plugins=pylint_flask_sqlalchemy.
error pylint: error: unrecognized arguments: --load-plugins=pylint_flask_sqlalchemy
cause Old pylint version that doesn't support the option or the plugin is not installed.
fix
Upgrade pylint to at least 1.7 or ensure the plugin is installed and accessible.
deprecated Support for Python 3.5 only; Python 3.6+ may require adjustments. The library is no longer actively maintained.
fix Consider migrating to pylint-sqlalchemy or directly configuring pylint's generated-members.
gotcha The plugin may not work with newer versions of pylint (2.x+). The last release (0.2.0) was published in 2018 and may have compatibility issues.
fix Check compatibility with your pylint version; consider using pylint-extension or contrib plugins.
gotcha The plugin only handles Flask-SQLAlchemy's `db.Model` and common patterns; custom attributes or dynamic models may still trigger false positives.
fix Use `generated-members` in pylintrc or ignore specific warnings manually.

Enable the plugin either in .pylintrc or via command line. The plugin teaches Pylint about SQLAlchemy's dynamic column attributes and relationships.

# In your .pylintrc:
[MASTER]
load-plugins=pylint_flask_sqlalchemy

# Or via command line:
pylint --load-plugins=pylint_flask_sqlalchemy myapp.py