flake8-enforce-type-annotations


Nameflake8-enforce-type-annotations JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/fylein/flake8-kwargs-enforcer
SummaryFlake8 plugin for enforcing type annotations.
upload_time2024-01-10 06:17:07
maintainer
docs_urlNone
authorSiva Narayanan
requires_python
licenseMIT
keywords flake8 type python enforce annotations
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Flake8 Typing Annotations Enforcement Plugin
============================================

Overview
--------

This Flake8 plugin is designed to enforce the usage of typing annotations in your Python code. By integrating this plugin into your Flake8 workflow, you can ensure that your codebase adheres to a consistent and explicit typing style, promoting better code readability and maintainability.

Features
--------

-   Type Annotation Enforcement: The plugin checks your Python code for functions, variables, and parameters that lack type annotations and raises warnings or errors accordingly.

-   Selective Ignoring: Use inline comments to selectively ignore the type annotation checks for specific lines or blocks of code.

Installation
------------

You can install this Flake8 plugin using pip:


`pip install flake8-enforce-type-annotations`

Usage
-----

After installation, the plugin becomes available as part of your Flake8 toolchain. Simply run Flake8 on your project to enforce typing annotations:


`flake8 your_project_directory`

### Configuration

You can configure the strictness of the enforcement by adjusting the plugin settings in your Flake8 configuration file (usually `.flake8`):


```[flake8]
per-file-ignores = 
    utils.py:ETA002,ETA001
```

### Inline Ignoring

If you need to bypass the type annotation checks for specific lines or blocks of code, you can use inline comments:


```# flake8: noqa
def unannotated_function():
    # ... code without type annotations
```

Contributing
------------

Contributions to this Flake8 plugin are welcome! If you encounter issues or have ideas for improvements, please open an issue or submit a pull request on the GitHub repository.

License
-------

This Flake8 plugin is distributed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fylein/flake8-kwargs-enforcer",
    "name": "flake8-enforce-type-annotations",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "flake8,type,python,enforce,annotations",
    "author": "Siva Narayanan",
    "author_email": "siva@fylehq.com",
    "download_url": "https://files.pythonhosted.org/packages/02/2c/5f6999d1ba254c50ae315a2969d838ab69e137c8b3a9745ddacc0f9e4dcf/flake8-enforce-type-annotations-0.1.1.tar.gz",
    "platform": null,
    "description": "Flake8 Typing Annotations Enforcement Plugin\n============================================\n\nOverview\n--------\n\nThis Flake8 plugin is designed to enforce the usage of typing annotations in your Python code. By integrating this plugin into your Flake8 workflow, you can ensure that your codebase adheres to a consistent and explicit typing style, promoting better code readability and maintainability.\n\nFeatures\n--------\n\n-   Type Annotation Enforcement: The plugin checks your Python code for functions, variables, and parameters that lack type annotations and raises warnings or errors accordingly.\n\n-   Selective Ignoring: Use inline comments to selectively ignore the type annotation checks for specific lines or blocks of code.\n\nInstallation\n------------\n\nYou can install this Flake8 plugin using pip:\n\n\n`pip install flake8-enforce-type-annotations`\n\nUsage\n-----\n\nAfter installation, the plugin becomes available as part of your Flake8 toolchain. Simply run Flake8 on your project to enforce typing annotations:\n\n\n`flake8 your_project_directory`\n\n### Configuration\n\nYou can configure the strictness of the enforcement by adjusting the plugin settings in your Flake8 configuration file (usually `.flake8`):\n\n\n```[flake8]\nper-file-ignores = \n    utils.py:ETA002,ETA001\n```\n\n### Inline Ignoring\n\nIf you need to bypass the type annotation checks for specific lines or blocks of code, you can use inline comments:\n\n\n```# flake8: noqa\ndef unannotated_function():\n    # ... code without type annotations\n```\n\nContributing\n------------\n\nContributions to this Flake8 plugin are welcome! If you encounter issues or have ideas for improvements, please open an issue or submit a pull request on the GitHub repository.\n\nLicense\n-------\n\nThis Flake8 plugin is distributed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Flake8 plugin for enforcing type annotations.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/fylein/flake8-kwargs-enforcer"
    },
    "split_keywords": [
        "flake8",
        "type",
        "python",
        "enforce",
        "annotations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12d3800d1426afb7f3e853ed8c189ca08efe2b48d3704dad62eb09684a713969",
                "md5": "49c92d09c31bce0ed79c331fc3c9ef7b",
                "sha256": "56f9b43c9c11eef0b019f997565d7c13b81644b678f9d246cbd7550a9268b321"
            },
            "downloads": -1,
            "filename": "flake8_enforce_type_annotations-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "49c92d09c31bce0ed79c331fc3c9ef7b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4667,
            "upload_time": "2024-01-10T06:17:04",
            "upload_time_iso_8601": "2024-01-10T06:17:04.588039Z",
            "url": "https://files.pythonhosted.org/packages/12/d3/800d1426afb7f3e853ed8c189ca08efe2b48d3704dad62eb09684a713969/flake8_enforce_type_annotations-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "022c5f6999d1ba254c50ae315a2969d838ab69e137c8b3a9745ddacc0f9e4dcf",
                "md5": "55996ed3ade9d966b3b09431e74a0f99",
                "sha256": "e36627a7b1abb5bfc3db5fddb7c2f0a4b1ac406005984ed05c386bbeaab51284"
            },
            "downloads": -1,
            "filename": "flake8-enforce-type-annotations-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "55996ed3ade9d966b3b09431e74a0f99",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4209,
            "upload_time": "2024-01-10T06:17:07",
            "upload_time_iso_8601": "2024-01-10T06:17:07.067575Z",
            "url": "https://files.pythonhosted.org/packages/02/2c/5f6999d1ba254c50ae315a2969d838ab69e137c8b3a9745ddacc0f9e4dcf/flake8-enforce-type-annotations-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-10 06:17:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fylein",
    "github_project": "flake8-kwargs-enforcer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "flake8-enforce-type-annotations"
}
        
Elapsed time: 0.60877s