flake8-no-types


Nameflake8-no-types JSON
Version 1.5.1 PyPI version JSON
download
home_pagehttps://github.com/adamchainz/flake8-no-types
SummaryA flake8 plugin to ban type hints.
upload_time2022-12-07 01:48:52
maintainer
docs_urlNone
authorAdam Johnson
requires_python>=3.7
licenseMIT
keywords flake8
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===============
flake8-no-types
===============

.. image:: https://img.shields.io/github/workflow/status/adamchainz/flake8-no-types/CI/main?style=for-the-badge
   :target: https://github.com/adamchainz/flake8-no-types/actions?workflow=CI

.. image:: https://img.shields.io/pypi/v/flake8-no-types.svg?style=for-the-badge
   :target: https://pypi.org/project/flake8-no-types/

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
   :target: https://github.com/psf/black

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit

Unmaintained (2022-12-07)
-------------------------

I stopped maintaining this package as it has never been popular.
Also, it isn’t really practical to ban all type hints, since tools like ``dataclasses`` use them at runtime.

----

A `flake8 <https://flake8.readthedocs.io/en/latest/index.html>`_ plugin to ban type hints.

This can be useful in code bases where you aren't running type checking (yet?) but developers or their IDE's add type hints that can be incorrect.

Requirements
============

Python 3.7 to 3.11 supported.

Installation
============

First, install with ``pip``:

.. code-block:: sh

     python -m pip install flake8-no-types

Second, if you define Flake8’s ``select`` setting, add the ``NT`` prefix to it.
Otherwise, the plugin should be active by default.

----

**Linting a Django project?**
Check out my book `Boost Your Django DX <https://adamchainz.gumroad.com/l/byddx>`__ which covers Flake8 and many other code quality tools.

----

Rules
=====

NT001: No type hints.
---------------------

Flags all forms of type hints:

* Function annotations: `def foo() -> int:`
* Variable hints: `foo: int = 1`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/adamchainz/flake8-no-types",
    "name": "flake8-no-types",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "flake8",
    "author": "Adam Johnson",
    "author_email": "me@adamj.eu",
    "download_url": "https://files.pythonhosted.org/packages/75/1e/7fabc3d207557fe8fcae25c41468cb1b86f0dab3ed19c4bdebd385370d45/flake8-no-types-1.5.1.tar.gz",
    "platform": null,
    "description": "===============\nflake8-no-types\n===============\n\n.. image:: https://img.shields.io/github/workflow/status/adamchainz/flake8-no-types/CI/main?style=for-the-badge\n   :target: https://github.com/adamchainz/flake8-no-types/actions?workflow=CI\n\n.. image:: https://img.shields.io/pypi/v/flake8-no-types.svg?style=for-the-badge\n   :target: https://pypi.org/project/flake8-no-types/\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge\n   :target: https://github.com/psf/black\n\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge\n   :target: https://github.com/pre-commit/pre-commit\n   :alt: pre-commit\n\nUnmaintained (2022-12-07)\n-------------------------\n\nI stopped maintaining this package as it has never been popular.\nAlso, it isn\u2019t really practical to ban all type hints, since tools like ``dataclasses`` use them at runtime.\n\n----\n\nA `flake8 <https://flake8.readthedocs.io/en/latest/index.html>`_ plugin to ban type hints.\n\nThis can be useful in code bases where you aren't running type checking (yet?) but developers or their IDE's add type hints that can be incorrect.\n\nRequirements\n============\n\nPython 3.7 to 3.11 supported.\n\nInstallation\n============\n\nFirst, install with ``pip``:\n\n.. code-block:: sh\n\n     python -m pip install flake8-no-types\n\nSecond, if you define Flake8\u2019s ``select`` setting, add the ``NT`` prefix to it.\nOtherwise, the plugin should be active by default.\n\n----\n\n**Linting a Django project?**\nCheck out my book `Boost Your Django DX <https://adamchainz.gumroad.com/l/byddx>`__ which covers Flake8 and many other code quality tools.\n\n----\n\nRules\n=====\n\nNT001: No type hints.\n---------------------\n\nFlags all forms of type hints:\n\n* Function annotations: `def foo() -> int:`\n* Variable hints: `foo: int = 1`\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A flake8 plugin to ban type hints.",
    "version": "1.5.1",
    "split_keywords": [
        "flake8"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "eaf2c0757b67ff32f6e9031d43a28872",
                "sha256": "5b09293dcc32c73808fbdba858f44875dd79dbbd8b392e95a6985a6feb50354b"
            },
            "downloads": -1,
            "filename": "flake8_no_types-1.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eaf2c0757b67ff32f6e9031d43a28872",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4112,
            "upload_time": "2022-12-07T01:48:50",
            "upload_time_iso_8601": "2022-12-07T01:48:50.830408Z",
            "url": "https://files.pythonhosted.org/packages/6b/de/61a74b97bd6d950dbff2399beac6a7a5db9e7267b35e23fd2a8f750a8b26/flake8_no_types-1.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "9f992d928c4d75c150c1678725eea652",
                "sha256": "bced358eba1400a08042aaae8b760fb5c4e12847786eb528d3fb51accbbaf422"
            },
            "downloads": -1,
            "filename": "flake8-no-types-1.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9f992d928c4d75c150c1678725eea652",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4405,
            "upload_time": "2022-12-07T01:48:52",
            "upload_time_iso_8601": "2022-12-07T01:48:52.214906Z",
            "url": "https://files.pythonhosted.org/packages/75/1e/7fabc3d207557fe8fcae25c41468cb1b86f0dab3ed19c4bdebd385370d45/flake8-no-types-1.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-07 01:48:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "adamchainz",
    "github_project": "flake8-no-types",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "flake8-no-types"
}
        
Elapsed time: 0.03813s