anybox / pylint_flask_sqlalchemy

pylint_flask_sqlalchemy is a Pylint plugin to improve static code analysis of Flask-SQLAlchemy based projects.
MIT License
8 stars 5 forks source link

Instance of 'Column' has no 'in_' member (no-member) #4

Open torotil opened 3 years ago

torotil commented 3 years ago

It seems that operators on ORM columns are not mapped properly for sqlalchemy 1.3 …

Test case:

"""Minimal test-case to reproduce a pylint-flask-sqlalchemy issue."""
# pylint: disable=too-few-public-methods

from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class User(db.Model):
    """Minimal model class."""

    id = db.Column(db.Integer(), primary_key=True)

User.query.filter(User.id.in_([1, 2, 3])).all()

Gives tihs output:

$ pylint minimal-pylint.py 
************* Module minimal-pylint
minimal-pylint.py:15:18: E1101: Instance of 'Column' has no 'in_' member (no-member)

-------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: -4.00/10, +4.00)
herrboyer commented 2 years ago

Thank you for the detailed error report, we are looking into how to fix the problem.

irl commented 2 years ago

Also Column.is_ is missing.

E1101: Instance of 'Column' has no 'is_' member (no-member)

(Tested with latest master commit today)

jlelong commented 2 years ago

Same issue with Column.asc.

ScholliYT commented 2 years ago

Also an issue with Column.ilike.

tweirtx commented 2 years ago

Any ETA on the fix for this?