This package provides a plugin for flake8 that checks the usage of ic() function from icecream package.
Project description
🌟 flake8-ic
A Flake8 plugin that helps detect the usage of the ic() function from the icecream package in your codebase.
📜 Description
The flake8-ic plugin ensures clean and production-ready code by identifying any instances of the ic() function, commonly used for debugging. This tool integrates seamlessly with flake8 to provide automated checks.
🚨 Detected Errors
The flake8-ic plugin checks for the usage of the ic() function and related methods from the icecream package in your codebase. Below is a list of errors it detects:
| Error Code | Description |
|---|---|
IC100 |
Avoid using ic() from the icecream package in production code. |
IC101 |
Avoid using ic.disabled() from the icecream package in production code. |
IC102 |
Avoid using ic.enabled() from the icecream package in production code. |
🚫 Disabling Checks
You can disable specific checks for flake8-ic using the --disable-ic-checks option. This is useful if you only want to enforce certain rules. The following options are available:
IC100: Disables checks for theic()function.IC101: Disables checks for theic.disabled()method.IC102: Disables checks for theic.enabled()method.
Examples
-
Disable a Single Check:
flake8 --disable-ic-checks=IC100
This will disable only the
IC100check. -
Disable Multiple Checks:
flake8 --disable-ic-checks=IC100,IC101
This will disable both the
IC100andIC101checks. -
Configuration in setup.cfg or tox.ini: You can set this option in your configuration file to apply it automatically:
[flake8] disable-ic-checks = IC100,IC102
-
Configuration in pyproject.toml: Add the configuration under the [tool.flake8] section:
[tool.flake8] disable-ic-checks = "IC100,IC102"
By disabling checks, you can tailor the plugin to match your project’s requirements while maintaining a clean and focused codebase.
📦 Installation
Install the plugin via pip:
pip install flake8-ic
✅ Verifying Installation
To confirm the plugin is installed, run:
flake8 --version
You should see flake8-ic listed among the installed plugins, along with the Flake8 version.
🤝 Contributors
A big thank you to everyone who contributed to this project! 💖
📧 Contact
(c) 2025, Created with ❤️ by Marco Espinosa
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8_ic-0.6.0.tar.gz.
File metadata
- Download URL: flake8_ic-0.6.0.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2de86792246fd5eb7958095a11c830440c2a832857c62814287a855f00ddf9e2
|
|
| MD5 |
df091f4a15282a67ed46cadf5f463d9c
|
|
| BLAKE2b-256 |
c0f0f4cec84aeef2c9d5618ac4c90d999903a1b9d9cd7e909f08b592eb8edea1
|
File details
Details for the file flake8_ic-0.6.0-py3-none-any.whl.
File metadata
- Download URL: flake8_ic-0.6.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54659ea6b7d9cffb1f846bba9dfabd74abcd2065e0d4691a35d571f6547085ec
|
|
| MD5 |
7b0a50d025ee32adeb7e9ab7783ce3c4
|
|
| BLAKE2b-256 |
ac13adf14ab34d077b3299ac8dfacbc434fff39ec326243e6daa39bd6b03b63e
|