pylint-quotes
raw JSON → 0.2.3 verified Mon Apr 27 auth: no python
A PyLint plugin that enforces quote consistency (single vs double quotes) in Python code. Current version 0.2.3. The project is in maintenance mode with infrequent releases.
pip install pylint-quotes Common errors
error ModuleNotFoundError: No module named 'pylint_quotes' ↓
cause The package is not installed or misnamed.
fix
pip install pylint-quotes
error pylint: command not found ↓
cause pylint itself is not installed.
fix
pip install pylint
error Unrecognized option found: --load-plugins=pylint-quotes ↓
cause Using hyphen instead of underscore in plugin name, or wrong pylint version.
fix
Use underscore: pylint --load-plugins=pylint_quotes
Warnings
gotcha pylint-quotes 0.2.2+ dropped compatibility with pylint < 2.8.0. Ensure you have pylint >= 2.8.0. ↓
fix Upgrade pylint to >= 2.8.0.
gotcha The plugin's behavior for triple-quoted strings and docstrings can be surprising. Triple quotes are always ignored by default. ↓
fix Review configuration options for 'ignore-triple-quotes' and 'avoid-escape'.
deprecated Support for Python 3.6 may be dropped in future releases. Python 3.6 reached end of life. ↓
fix Upgrade to Python 3.7+.
Imports
- QuoteChecker wrong
from pylint_quotes import QuoteCheckercorrectfrom pylint_quotes.checker import QuoteChecker
Quickstart
# Enable the plugin in your .pylintrc or via command line:
# [MASTER]
# load-plugins=pylint_quotes
#
# Then run:
pylint --load-plugins=pylint_quotes my_file.py