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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 28.3MB
glibcpy 3.10–3.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.fixWhile `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.fixRefer 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.fixEnsure 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.fixIf `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.