flake8-pytest-importorskip-1.1.0
توضیحات
Make pycodestyle treat pytest.importorskip as an import statement (avoid E402)
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | flake8-pytest-importorskip-1.1.0 |
| نام | flake8-pytest-importorskip |
| نسخه کتابخانه | 1.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ash Berlin-Taylor |
| ایمیل نویسنده | ash@apache.org |
| آدرس صفحه اصلی | https://pypi.org/project/flake8-pytest-importorskip |
| آدرس اینترنتی | https://pypi.org/project/flake8-pytest-importorskip/ |
| مجوز | Apache 2.0 |
# flake8-pytest-importorskip
[](https://pypi.org/project/flake8-pytest-importorskip)
[](https://pypi.org/project/flake8-pytest-importorskip)
[](https://pypistats.org/packages/flake8-pytest-importorskip)

[](https://codecov.io/gh/ashb/flake8-pytest-importorskip)
[](https://en.wikipedia.org/wiki/Apache_License)
[](https://github.com/ambv/black)
## Description
Treat `pytest.importorskip` as an import statement, not code, to silence the "module level import not at top of file" (E402) from pycodestyle
It allows code such as this to pass without having to globally disable E402.
It does this in a _slightly_ hacky way (see the docs of [kgb] for details) , so it may break in future versions of pycodestyle.
### Checks:
None
## Installation
pip install flake8-pytest-importorskip
## Usage
`flake8 <your code>`
## For developers
### Create venv and install deps
make init
### Install git precommit hook
make precommit_install
### Run linters, autoformat, tests etc.
make pretty lint test
### Bump new version
make bump_major
make bump_minor
make bump_patch
## License
Apache 2.0
[kgb]: https://github.com/beanbaginc/kgb
## Change Log
Unreleased
-----
* ...
1.1.0 - 2021-03-01
-----
* Replace accessing private state of flake8 plugins with wrapping/spying on function, using [kgb]
1.0.0 - 2021-02-19
-----
* initial
نیازمندی
| مقدار | نام |
|---|---|
| >=3 | flake8 |
| >=6.0,<7.0 | kgb |
| >=2.6.0,<3.0.0 | pycodestyle |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6,<4.0 | Python |
نحوه نصب
نصب پکیج whl flake8-pytest-importorskip-1.1.0:
pip install flake8-pytest-importorskip-1.1.0.whl
نصب پکیج tar.gz flake8-pytest-importorskip-1.1.0:
pip install flake8-pytest-importorskip-1.1.0.tar.gz