flake8-kotoha


Nameflake8-kotoha JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
Summaryflake8 plugin to improve your type hints
upload_time2024-10-12 07:34:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License
keywords flake8 type hints
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # flake8-kotoha

[**K**o**T**o**H**a](https://millionlive-theaterdays.idolmaster-official.jp/idol/kotoha/): **K**aizen **T**ype **H**int

## Install

pipx

```sh
$ pipx install flake8
$ pipx inject flake8 flake8-kotoha
$ flake8 -h
...
Installed plugins: flake8-kotoha: 0.1.0, ...
```

venv + pip

```sh
$ python -m venv .venv --upgrade-deps
$ .venv/bin/python -m pip install flake8-kotoha
$ .venv/bin/flake8 -h
...
Installed plugins: flake8-kotoha: 0.1.0, ...
```

## Usage

```python
def plus_one(numbers: list[int]) -> list[int]:
    return [n + 1 for n in numbers]
```

```sh
$ flake8 example.py
example.py:1:14: KTH101 Type hint with abstract type `collections.abc.Iterable` or `collections.abc.Sequence`, instead of concrete type `list`
```

## Error codes

Type hints in function **parameters**

Use abstract types instead of concrete ones

| error code | description |
|:----:|:------------|
| KTH101 | Use `Iterable` or `Sequence` instead of `list` |
| KTH102 | Use `Iterable` or `Sequence` instead of `tuple` |
| KTH103 | Use `Iterable` instead of `set` |
| KTH104 | Use `Iterable` instead of `dict` |

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "flake8-kotoha",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "flake8, type hints",
    "author": null,
    "author_email": "nikkie <takuyafjp+develop@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f4/66/d1be2370846ac0a3cecbac41c256032936f0d8ecc6c072926f287e12588a/flake8_kotoha-0.1.0.tar.gz",
    "platform": null,
    "description": "# flake8-kotoha\n\n[**K**o**T**o**H**a](https://millionlive-theaterdays.idolmaster-official.jp/idol/kotoha/): **K**aizen **T**ype **H**int\n\n## Install\n\npipx\n\n```sh\n$ pipx install flake8\n$ pipx inject flake8 flake8-kotoha\n$ flake8 -h\n...\nInstalled plugins: flake8-kotoha: 0.1.0, ...\n```\n\nvenv + pip\n\n```sh\n$ python -m venv .venv --upgrade-deps\n$ .venv/bin/python -m pip install flake8-kotoha\n$ .venv/bin/flake8 -h\n...\nInstalled plugins: flake8-kotoha: 0.1.0, ...\n```\n\n## Usage\n\n```python\ndef plus_one(numbers: list[int]) -> list[int]:\n    return [n + 1 for n in numbers]\n```\n\n```sh\n$ flake8 example.py\nexample.py:1:14: KTH101 Type hint with abstract type `collections.abc.Iterable` or `collections.abc.Sequence`, instead of concrete type `list`\n```\n\n## Error codes\n\nType hints in function **parameters**\n\nUse abstract types instead of concrete ones\n\n| error code | description |\n|:----:|:------------|\n| KTH101 | Use `Iterable` or `Sequence` instead of `list` |\n| KTH102 | Use `Iterable` or `Sequence` instead of `tuple` |\n| KTH103 | Use `Iterable` instead of `set` |\n| KTH104 | Use `Iterable` instead of `dict` |\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "flake8 plugin to improve your type hints",
    "version": "0.1.0",
    "project_urls": {
        "Repository": "https://github.com/ftnext/kotoha-python-linter"
    },
    "split_keywords": [
        "flake8",
        " type hints"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e4f9d094db83867bedb19ecc785e8261266b72fe739faaff828ca4f3a9682db8",
                "md5": "53f680ab392f066a2f861ee6c000ea29",
                "sha256": "7d9a1bd8f45d5e85e64df8b2a5d4ad355d047d3c62de3c728a263fc429947be1"
            },
            "downloads": -1,
            "filename": "flake8_kotoha-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "53f680ab392f066a2f861ee6c000ea29",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 4686,
            "upload_time": "2024-10-12T07:34:54",
            "upload_time_iso_8601": "2024-10-12T07:34:54.848336Z",
            "url": "https://files.pythonhosted.org/packages/e4/f9/d094db83867bedb19ecc785e8261266b72fe739faaff828ca4f3a9682db8/flake8_kotoha-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f466d1be2370846ac0a3cecbac41c256032936f0d8ecc6c072926f287e12588a",
                "md5": "215bf5b06b4786b79e44bb7f018a2f09",
                "sha256": "ff464e2456af7da8c98aad3916e5573c567277887823111efee8e0dfc21fd9b1"
            },
            "downloads": -1,
            "filename": "flake8_kotoha-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "215bf5b06b4786b79e44bb7f018a2f09",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 4535,
            "upload_time": "2024-10-12T07:34:56",
            "upload_time_iso_8601": "2024-10-12T07:34:56.260904Z",
            "url": "https://files.pythonhosted.org/packages/f4/66/d1be2370846ac0a3cecbac41c256032936f0d8ecc6c072926f287e12588a/flake8_kotoha-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-12 07:34:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ftnext",
    "github_project": "kotoha-python-linter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "flake8-kotoha"
}
        
Elapsed time: 0.33349s