flake8-if-statements-1.0.0
توضیحات
Flake8 linter for if statements
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | flake8-if-statements-1.0.0 |
| نام | flake8-if-statements |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | David S |
| ایمیل نویسنده | d1618033@gmail.com |
| آدرس صفحه اصلی | https://pypi.org/project/flake8-if-statements |
| آدرس اینترنتی | https://pypi.org/project/flake8-if-statements/ |
| مجوز | MIT |
# flake8-if-statements
[](https://pypi.org/project/flake8-if-statements)
[](https://pypi.org/project/flake8-if-statements)
[](https://pypistats.org/packages/flake8-if-statements)
[](https://travis-ci.org/d1618033/flake8-if-statements)
[](https://codecov.io/gh/d1618033/flake8-if-statements)
[](https://en.wikipedia.org/wiki/MIT_License)
[](https://github.com/ambv/black)
## Description
Flake8 linter for if statements
### Checks:
* IFS001: Use one liner so as not to repeat assignment to the same variable
e.g:
Bad:
```python
if x == 1:
y = 10
else:
y = 11
```
Good:
```python
y = 10 if x == 1 else 11
```
## Installation
pip install flake8-if-statements
## 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
MIT
## Change Log
Unreleased
-----
* ...
1.0.0 - 2022-09-17
-----
* Changed IFSTMT to IFS to comply with flake8
* Remove python3.6 support
0.1.0 - 2020-03-14
-----
* initial
نیازمندی
| مقدار | نام |
|---|---|
| >=0.8.1,<0.9.0 | astor |
| >=1.2.0,<2.0.0 | flake8-plugin-utils |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl flake8-if-statements-1.0.0:
pip install flake8-if-statements-1.0.0.whl
نصب پکیج tar.gz flake8-if-statements-1.0.0:
pip install flake8-if-statements-1.0.0.tar.gz