title: SQLALchemy .query: Unresolved attribute reference 'query' for class 'Car'
body: <p>I have an issue that was already mentioned here
  <a href="https://youtrack.jetbrains.com/issue/PY-44557" rel="nofollow noreferrer">https://youtrack.jetbrains.com/issue/PY-44557</a></p>
  <p>But I couldn't find a solution yet. I'm using Python Flask with SQLAlchemy to create an API service.</p>
  <p>Here are my imports:</p>
  <pre><code>from flask import Flask, jsonify, request
  from flask_sqlalchemy import SQLAlchemy
  from sqlalchemy import Column, Integer, String, Float
  import os
  from flask_marshmallow import Marshmallow
  
  
  app = Flask(__name__)
  basedir = os.path.abspath(os.path.dirname(__file__))
  app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'+os.path.join(basedir, 'dealers.db')
  
  
  db = SQLAlchemy(app)
  ma = Marshmallow(app)
  </code></pre>
  <p>Here is my data model:</p>
  <pre><code>class Car(db.Model):
      __tablename__ = 'cars'
      car_id = Column(Integer, primary_key=True)
      car_name = Column(String)
      car_type = Column(String)
   
  
  class CarSchema(ma.Schema):
      class Meta:
          fields = ('car_id', 'car_name', 'car_type')
  
  car_schema = CarSchema()  
  cars_schema = CarSchema(many=True)
  
  </code></pre>
  <p>I'm having an issue/Warning with my UDF when I use <strong>.query</strong></p>
  <pre><code>def cars():
      car_list = Car.query.all()  # *Unresolved attribute reference 'query' for class 'Car'
      result = cars_schema.dump(car_list)
      return jsonify(result)
  </code></pre>