Registry / testing / pylint-celery

pylint-celery

JSON →
library0.3pypypiunverified

pylint-celery is a Pylint plugin designed to enhance Pylint's ability to recognize and understand common patterns and potential errors when analyzing code that uses the Celery distributed task queue library. It aims to reduce false positives and provide more accurate linting for Celery-specific constructs. The current version is 0.3, with the last PyPI release dating back to 2014, suggesting a low-cadence, maintenance-focused development cycle, though the GitHub repository under pylint-dev sees ongoing issue tracking.

pip install pylint-celery
INSTALL
IMPORT
SIG · PYLINT-CELERY
P
pylint-celery
testingpythonv0.3
Install
3.5s avg
Import
Disk
27MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 28.3MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.5s · import 0.000s · 29MB
27MB installed
● package 27MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pylint_celery
pylint --load-plugins pylint_celery
This is a Pylint plugin and is loaded via the Pylint command-line argument, not imported directly in Python code.

After installing the plugin, you enable it by passing `--load-plugins pylint_celery` to your Pylint command. This integrates its checks into the linting process for your Celery-based code.

# 1. Install pylint-celery pip install pylint-celery # 2. Create a dummy Celery task file (e.g., myapp/tasks.py) # Ensure Celery and Pylint are in your environment # Example: myapp/tasks.py # from celery import Celery # # app = Celery('myapp', broker='redis://localhost:6379/0') # # @app.task # def add(x, y): # return x + y # 3. Run Pylint with the plugin loaded # Navigate to your project root or where your code resides pylint --load-plugins pylint_celery myapp/tasks.py
Debug
Known issues
gotchaThe project lacks a `pyproject.toml` file, leading to a `DEPRECATION` warning when installed using newer `pip` versions, as it defaults to the legacy `setup.py install` method.
fix
While `pylint-celery` itself would need an update to add `pyproject.toml`, users can ensure the `wheel` package is installed to mitigate some pip warnings, or be aware of the legacy installation method.
affects: 0.3 and possibly earlier versions, with pip >= 23.1
gotchaPylint-celery's compatibility with newer Pylint versions is uncertain. An old issue (2017) indicated test failures with Pylint 1.7+. Users may encounter unexpected warnings or errors if using `pylint-celery` with significantly newer Pylint versions without official updates.
fix
Refer to the `pylint-celery` GitHub issues for recent compatibility reports or consider pinning Pylint to an older, compatible version if issues arise.
affects: Potentially all versions of `pylint-celery` with Pylint > 1.7
gotchaPylint (even with the plugin) can sometimes fail to resolve Celery imports (e.g., `E0401: Unable to import 'celery'`) if the Python environment or `PYTHONPATH` is not correctly configured or the virtual environment is not properly activated when running Pylint.
fix
Ensure Pylint is run within the activated virtual environment containing Celery. If issues persist, configure Pylint's `init-hook` or `sys-path` in `.pylintrc` or `pyproject.toml` to include necessary paths.
affects: All versions
gotchaThe plugin's primary role is to fix 'celery.task is not callable' warnings. However, Pylint might still issue `E1120: No value for argument 'self'` for `bind=True` Celery tasks if the plugin doesn't fully cover specific class-based task definitions or complex scenarios, requiring manual disables.
fix
If `E1120` or similar warnings persist for valid `bind=True` tasks, consider explicitly disabling the `no-value-for-parameter` message for the affected lines or files using `# pylint: disable=no-value-for-parameter`.
affects: All versions
Upgrade
Version history
0.3latest on PyPI · released Sep 25, 2014
Audit
Dependencies
pylintrequiredCore linter framework; pylint-celery is a plugin for it.
celeryrequiredThe library being linted; pylint-celery provides Celery-specific checks.
pylint-plugin-utilsrequiredUtility library for developing Pylint plugins, often a dependency for Pylint plugins.
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
pylint-celery — pip install pylint-celery · libregistry