A flake8 plugin that checks bad async / asyncio practices
Project description
flake8-async
A flake8 plugin that checks for bad async / asyncio practices.
Installation
pip install flake8-async
- Or from GitHub
pip install git+https://github.com/cooperlees/flake8-async
List of warnings
- ASYNC100: Warning about the use of a blocking http call inside an
async def - ASYNC101: Warning about the use of
open,time.sleepor methods insubprocess, inside anasync def. - ASYNC102: Warning about the use of unsafe methods in
osinside anasync def.
Development
When you wish to add a check to flake8-async please ensure the following:
- This
README.mdgets a one line about your new warning - CHANGELOG gets added to a
## UNRELEASEDsection - Unittests are added showing the check hilight where it should and shouldn't
To run our test suite please use tox.
python3 -m venv --upgrade-deps /tmp/tfa
/tmp/tfa/bin/pip install tox
# Linting
/tmp/tfa/bin/tox -e check
# Test Running
/tmp/tfa/bin/tox -e test -- -n auto
License
MIT
Changelog
22.11.14
Add ASYNC102: probable blocking os call in async function
22.11.6
Add ASYNC101: blocking sync call in async function
22.3.10
- Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8-async-22.11.14.tar.gz.
File metadata
- Download URL: flake8-async-22.11.14.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4db2d55883653b47d4bfd946fdf506e8958bb4ca35974790b8c3e620fc1abff
|
|
| MD5 |
ba954350b37b7ffcfb1fe3cd8a690792
|
|
| BLAKE2b-256 |
021c7e8aac702377707a99cb00a246053e3c3e2d03150fb4551976432914a321
|
File details
Details for the file flake8_async-22.11.14-py3-none-any.whl.
File metadata
- Download URL: flake8_async-22.11.14-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
317cf0f882a2f4a09c2250c451acff8358d7faec8a0aa54521b6e69336fe9d0b
|
|
| MD5 |
b29beae35e8038904136e646f1038f6d
|
|
| BLAKE2b-256 |
1c8b8f9fc10b788e3d2bf851fd6fed6752fd8828bec95cdde1269182b24d4cb5
|