flake8_typechecking_import-0.5


توضیحات

A flake plugin that checks for typing.TYPE_CHECKING-able imports
ویژگی مقدار
سیستم عامل -
نام فایل flake8_typechecking_import-0.5
نام flake8_typechecking_import
نسخه کتابخانه 0.5
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Adrian Room
ایمیل نویسنده ingolemo@gmail.com
آدرس صفحه اصلی https://github.com/ingolemo/flake8-typechecking_import
آدرس اینترنتی https://pypi.org/project/flake8_typechecking_import/
مجوز -
Flake8-Typechecking_Import ========================== A plugin for flake8 that checks your code for imports that are only used in annotations. These imports can then be moved under an ``if typing.TYPE_CHECKING:`` block to prevent them being imported at runtime. This can minimise the number of runtime dependencies that your modules have and perhaps also reduce the likelyhood of a circular import. For example: .. code:: python import dataclasses import datetime @dataclasses.dataclass class Person: name: str birthday: datetime.date The above code will emit a lint (code: TCI100) telling you that it can be converted to this: .. code:: python import dataclasses import typing if typing.TYPE_CHECKING: import datetime @dataclasses.dataclass class Person: name: str birthday: datetime.date You can install the latest version from pypi using pip like so:: pip install flake8-typechecking_import


نیازمندی

مقدار نام
- flake8
- dataclasses;python_version=="3.6"
- black
- mypy
- tox
- pytest
- pytest-sugar
- pytest-coverage
- coverage[toml]
- types-dataclasses


زبان مورد نیاز

مقدار نام
>3.6 Python


نحوه نصب


نصب پکیج whl flake8_typechecking_import-0.5:

    pip install flake8_typechecking_import-0.5.whl


نصب پکیج tar.gz flake8_typechecking_import-0.5:

    pip install flake8_typechecking_import-0.5.tar.gz