A pre-commit script to make log lines lazzier
Project description
Lazy log formatter
Pre-commit hook to automatically detect and convert f-strings in Python code used in log calls to lazy log calls, following W1203 Pylint rule:
Usage
To use with pre-commit, add the following to your .pre-commit-config.yaml
:
- repo: https://github.com/dmar1n/lazy-log-formatter
rev: 0.2.1
hooks:
- id: lazy-log-formatter
args: ['--fix']
Options
--fix
: Automatically fix f-strings used in log calls to lazy log calls.
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
Built Distribution
File details
Details for the file lazy_log_formatter-0.3.2.tar.gz
.
File metadata
- Download URL: lazy_log_formatter-0.3.2.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d3a78080089514e673fc6cf8714ff56b2a546052f4af4f15a003c569383f0d8 |
|
MD5 | 85f75c5d6807739da5d141a9b96e2c5e |
|
BLAKE2b-256 | 8c518da1e065b308d861f71cd08d6ba5862c523ef9a99f2250e149ce518c10a3 |
File details
Details for the file lazy_log_formatter-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: lazy_log_formatter-0.3.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9f48d573b38f1038de6cd2cae184771c54c48bc498d0e95a048c1e139fb962a |
|
MD5 | 4f2d043dcf35525d7f3e40b027b1b94a |
|
BLAKE2b-256 | 92be0b8aea7ea8dd906de5c8b86ca64ed581054aee2b9ace44478c653c0c7ef6 |