Skip to main content

A Pylint plugin for improving code analysis when editing code using Flask-SQLAlchemy

Project description

pylint_flask_sqlalchemy

Beware: this is still a WIP.

About

pylint_flask_sqlalchemy is Pylint plugin for improving code analysis when editing code using Flask-SQLAlchemy.

Usage

Using a simple flask app

# app.py
from flask import Flask
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
db = SQLAlchemy(app)


class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(80), unique=True, nullable=False)
    email = db.Column(db.String(120), unique=True, nullable=False)

    def __repr__(self):
        return '<User %r>' % self.username

Before pylint_flask_sqlalchemy :

pylint app.py

After :

pylint --load-plugins pylint_flask_sqlalchemy app.py

Installation

pip install pylint_flask_sqlalchemy

Roadmap

  • write tests
  • silence too-few-public-methods for models

Changelog

Current version

New

  • First draft of the plugin.

Fixes

  • Packaging.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylint_flask_sqlalchemy-0.0.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

pylint_flask_sqlalchemy-0.0.2-py3-none-any.whl (16.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page