flake8-ic


Nameflake8-ic JSON
Version 0.6.0 PyPI version JSON
download
home_pageNone
SummaryThis package provides a plugin for flake8 that checks the usage of ic() function from icecream package.
upload_time2025-01-10 23:37:19
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2025 Marco Espinosa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords code quality debugging flake8 ic icecream linting plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- Shields -->
<p align="center">
<a href="https://github.com/maekind/flake8-ic/actions/workflows/testing.yaml"><img src="https://img.shields.io/github/actions/workflow/status/maekind/flake8-ic/testing.yaml?style=for-the-badge&label=Tests πŸ§ͺ" hspace="5" vspace="2"></a>
<a href="https://codecov.io/gh/maekind/flake8-ic"><img src="https://img.shields.io/codecov/c/github/maekind/flake8-ic?style=for-the-badge&color=yellow&label=COVERAGE πŸ“Š" hspace="5" vspace="2"></a>
<br>
<a href="https://github.com/maekind/flake8-ic/actions/workflows/release.yaml"><img src="https://img.shields.io/github/actions/workflow/status/maekind/flake8-ic/release.yaml?style=for-the-badge&label=Release and Publish ✨" hspace="5" vspace="2"></a>
<a href="https://pypi.org/project/flake8-ic"><img src="https://img.shields.io/github/v/release/maekind/flake8-ic?color=blue&label=pypi πŸ“¦&style=for-the-badge" hspace="5" vspace="2"></a>
<br>  
<a href="https://github.com/maekind/flake8-ic/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-orange?style=for-the-badge&label=license πŸ“œ" hspace="5" vspace="2"></a>
<a href="https://github.com/maekind/flake8-ic"><img src="https://img.shields.io/github/repo-size/maekind/flake8-ic?color=red&style=for-the-badge&label=repo size πŸ—„οΈ" hspace="5" vspace="2"></a>
<a href="https://github.com/maekind/flake8-ic"><img src="https://img.shields.io/github/last-commit/maekind/flake8-ic?color=black&style=for-the-badge&label=last commit ⏳" hspace="5" vspace="2"></a>
<br>
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python%20versions%20🐍-3.11%20|%203.12%20|%203.13-lightblue?style=for-the-badge" hspace="5" vspace="2"></a>
</p>

# 🌟 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 the `ic()` function.
- `IC101`: Disables checks for the `ic.disabled()` method.
- `IC102`: Disables checks for the `ic.enabled()` method.

#### Examples

1. **Disable a Single Check**:

   ```bash
   flake8 --disable-ic-checks=IC100
   ```

   This will disable only the `IC100` check.

2. **Disable Multiple Checks**:

   ```bash
    flake8 --disable-ic-checks=IC100,IC101
    ```

    This will disable both the `IC100` and `IC101` checks.

3. **Configuration in setup.cfg or tox.ini**:
   You can set this option in your configuration file to apply it automatically:

   ```bash
   [flake8]
   disable-ic-checks = IC100,IC102
   ```

4. **Configuration in pyproject.toml**:
   Add the configuration under the [tool.flake8] section:

   ```bash
   [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`:

```bash
pip install flake8-ic
```

---

## βœ… Verifying Installation

To confirm the plugin is installed, run:

```bash
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! πŸ’–

<a href="https://github.com/maekind/flake8-ic/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=maekind/flake8-ic" alt="Contributors" />
</a>

---

## πŸ“§ Contact

(c) 2025, Created with ❀️ by [Marco Espinosa](mailto:marco@marcoespinosa.com)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "flake8-ic",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "code quality, debugging, flake8, ic, icecream, linting, plugin",
    "author": null,
    "author_email": "Marco Espinosa <marco@marcoespinosa.com>",
    "download_url": "https://files.pythonhosted.org/packages/c0/f0/f4cec84aeef2c9d5618ac4c90d999903a1b9d9cd7e909f08b592eb8edea1/flake8_ic-0.6.0.tar.gz",
    "platform": null,
    "description": "<!-- Shields -->\n<p align=\"center\">\n<a href=\"https://github.com/maekind/flake8-ic/actions/workflows/testing.yaml\"><img src=\"https://img.shields.io/github/actions/workflow/status/maekind/flake8-ic/testing.yaml?style=for-the-badge&label=Tests \ud83e\uddea\" hspace=\"5\" vspace=\"2\"></a>\n<a href=\"https://codecov.io/gh/maekind/flake8-ic\"><img src=\"https://img.shields.io/codecov/c/github/maekind/flake8-ic?style=for-the-badge&color=yellow&label=COVERAGE \ud83d\udcca\" hspace=\"5\" vspace=\"2\"></a>\n<br>\n<a href=\"https://github.com/maekind/flake8-ic/actions/workflows/release.yaml\"><img src=\"https://img.shields.io/github/actions/workflow/status/maekind/flake8-ic/release.yaml?style=for-the-badge&label=Release and Publish \u2728\" hspace=\"5\" vspace=\"2\"></a>\n<a href=\"https://pypi.org/project/flake8-ic\"><img src=\"https://img.shields.io/github/v/release/maekind/flake8-ic?color=blue&label=pypi \ud83d\udce6&style=for-the-badge\" hspace=\"5\" vspace=\"2\"></a>\n<br>  \n<a href=\"https://github.com/maekind/flake8-ic/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-orange?style=for-the-badge&label=license \ud83d\udcdc\" hspace=\"5\" vspace=\"2\"></a>\n<a href=\"https://github.com/maekind/flake8-ic\"><img src=\"https://img.shields.io/github/repo-size/maekind/flake8-ic?color=red&style=for-the-badge&label=repo size \ud83d\uddc4\ufe0f\" hspace=\"5\" vspace=\"2\"></a>\n<a href=\"https://github.com/maekind/flake8-ic\"><img src=\"https://img.shields.io/github/last-commit/maekind/flake8-ic?color=black&style=for-the-badge&label=last commit \u23f3\" hspace=\"5\" vspace=\"2\"></a>\n<br>\n<a href=\"https://www.python.org/downloads/\"><img src=\"https://img.shields.io/badge/python%20versions%20\ud83d\udc0d-3.11%20|%203.12%20|%203.13-lightblue?style=for-the-badge\" hspace=\"5\" vspace=\"2\"></a>\n</p>\n\n# \ud83c\udf1f flake8-ic\n\nA **Flake8 plugin** that helps detect the usage of the `ic()` function from the `icecream` package in your codebase.\n\n---\n\n## \ud83d\udcdc Description\n\nThe `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.\n\n---\n\n## \ud83d\udea8 Detected Errors\n\nThe `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:\n\n| **Error Code** | **Description**                                                                                     |\n|----------------|-----------------------------------------------------------------------------------------------------|\n| `IC100`        | Avoid using `ic()` from the `icecream` package in production code.                                  |\n| `IC101`        | Avoid using `ic.disabled()` from the `icecream` package in production code.                         |\n| `IC102`        | Avoid using `ic.enabled()` from the `icecream` package in production code.                          |\n\n---\n\n### \ud83d\udeab Disabling Checks\n\nYou 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:\n\n- `IC100`: Disables checks for the `ic()` function.\n- `IC101`: Disables checks for the `ic.disabled()` method.\n- `IC102`: Disables checks for the `ic.enabled()` method.\n\n#### Examples\n\n1. **Disable a Single Check**:\n\n   ```bash\n   flake8 --disable-ic-checks=IC100\n   ```\n\n   This will disable only the `IC100` check.\n\n2. **Disable Multiple Checks**:\n\n   ```bash\n    flake8 --disable-ic-checks=IC100,IC101\n    ```\n\n    This will disable both the `IC100` and `IC101` checks.\n\n3. **Configuration in setup.cfg or tox.ini**:\n   You can set this option in your configuration file to apply it automatically:\n\n   ```bash\n   [flake8]\n   disable-ic-checks = IC100,IC102\n   ```\n\n4. **Configuration in pyproject.toml**:\n   Add the configuration under the [tool.flake8] section:\n\n   ```bash\n   [tool.flake8]\n   disable-ic-checks = \"IC100,IC102\"\n   ```\n\nBy disabling checks, you can tailor the plugin to match your project\u2019s requirements while maintaining a clean and focused codebase.\n\n## \ud83d\udce6 Installation\n\nInstall the plugin via `pip`:\n\n```bash\npip install flake8-ic\n```\n\n---\n\n## \u2705 Verifying Installation\n\nTo confirm the plugin is installed, run:\n\n```bash\nflake8 --version\n```\n\nYou should see `flake8-ic` listed among the installed plugins, along with the Flake8 version.\n\n---\n\n## \ud83e\udd1d Contributors\n\nA big thank you to everyone who contributed to this project! \ud83d\udc96\n\n<a href=\"https://github.com/maekind/flake8-ic/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=maekind/flake8-ic\" alt=\"Contributors\" />\n</a>\n\n---\n\n## \ud83d\udce7 Contact\n\n(c) 2025, Created with \u2764\ufe0f by [Marco Espinosa](mailto:marco@marcoespinosa.com)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2025 Marco Espinosa  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "This package provides a plugin for flake8 that checks the usage of ic() function from icecream package.",
    "version": "0.6.0",
    "project_urls": null,
    "split_keywords": [
        "code quality",
        " debugging",
        " flake8",
        " ic",
        " icecream",
        " linting",
        " plugin"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ac13adf14ab34d077b3299ac8dfacbc434fff39ec326243e6daa39bd6b03b63e",
                "md5": "7b0a50d025ee32adeb7e9ab7783ce3c4",
                "sha256": "54659ea6b7d9cffb1f846bba9dfabd74abcd2065e0d4691a35d571f6547085ec"
            },
            "downloads": -1,
            "filename": "flake8_ic-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7b0a50d025ee32adeb7e9ab7783ce3c4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 5624,
            "upload_time": "2025-01-10T23:37:18",
            "upload_time_iso_8601": "2025-01-10T23:37:18.682954Z",
            "url": "https://files.pythonhosted.org/packages/ac/13/adf14ab34d077b3299ac8dfacbc434fff39ec326243e6daa39bd6b03b63e/flake8_ic-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c0f0f4cec84aeef2c9d5618ac4c90d999903a1b9d9cd7e909f08b592eb8edea1",
                "md5": "df091f4a15282a67ed46cadf5f463d9c",
                "sha256": "2de86792246fd5eb7958095a11c830440c2a832857c62814287a855f00ddf9e2"
            },
            "downloads": -1,
            "filename": "flake8_ic-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "df091f4a15282a67ed46cadf5f463d9c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 27289,
            "upload_time": "2025-01-10T23:37:19",
            "upload_time_iso_8601": "2025-01-10T23:37:19.890782Z",
            "url": "https://files.pythonhosted.org/packages/c0/f0/f4cec84aeef2c9d5618ac4c90d999903a1b9d9cd7e909f08b592eb8edea1/flake8_ic-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-10 23:37:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "flake8-ic"
}
        
Elapsed time: 1.17593s