Skip to main content

pylint-sqlalchemy2

A Pylint plugin for SQLAlchemy 2.x compatibility. Install and forget!

Fixes false positive errors when using Pylint with SQLAlchemy, particularly for dynamically generated SQL functions like func.count(), func.sum(), func.max(), etc.

Installation

pip install pylint-sqlalchemy2

That's it! The plugin activates automatically. No configuration needed.

What it fixes

E1102: not-callable for func.*

SQLAlchemy's func object dynamically generates SQL function calls. Pylint cannot analyze this and reports false positives:

from sqlalchemy import func, select

# Without this plugin, pylint reports:
# E1102: func.count is not callable (not-callable)
query = select(func.count()).select_from(User)

This plugin teaches Pylint that func.count(), func.sum(), func.max(), and all other func.* attributes are callable.

How it works

The plugin uses a .pth file to automatically register Astroid transforms when Python starts. This means it works without any configuration - just install and run pylint as usual.

Alternative usage

If you prefer explicit configuration, you can also use:

Command line:

pylint --load-plugins=pylint_sqlalchemy2 your_code.py

pylintrc or pyproject.toml:

[MASTER]
load-plugins=pylint_sqlalchemy2

Compatibility

  • Python 3.9+
  • Pylint 3.0+
  • Astroid 3.0+
  • SQLAlchemy 1.4+ / 2.x

Why not pylint-sqlalchemy?

The original pylint-sqlalchemy package is deprecated and doesn't handle func.* callable issues. This plugin is a modern replacement with automatic activation.

License

MIT License

Metadata

Release files for pylint-sqlalchemy2 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylint-sqlalchemy2 0.2.0
File Size Uploaded Provenance Actions
pylint_sqlalchemy2-0.2.0.tar.gz 4.0 kB Without provenance Details for pylint_sqlalchemy2-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pylint-sqlalchemy2 0.2.0
File Interpreter ABI Platform Actions
pylint_sqlalchemy2-0.2.0-py3-none-any.whl Python 3 none any Details for pylint_sqlalchemy2-0.2.0-py3-none-any.whl

Total release size: 9.6 kB

Release files / pylint_sqlalchemy2-0.2.0.tar.gz

Download URL pylint_sqlalchemy2-0.2.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6773c79db256deda3ea7a7cce9a16da06093aa213a60b52d271045100c991de5
BLAKE2b-256 checksum
How to use checksums
77a0c5460ee8f21434f90435df26c8172726dd4bb0d22f9256013ad0d4cb8e39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pylint_sqlalchemy2-0.2.0-py3-none-any.whl

Download URL pylint_sqlalchemy2-0.2.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e29affad3454d00ad88dfc55aa1211681ee5edfdca661e26f5ab33c977ae8a02
BLAKE2b-256 checksum
How to use checksums
bc777926bf3d4da1a8ca11f8db693dc20c7b4bac749eb31b4bfb429cf074575a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for pylint-sqlalchemy2 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page