Skip to main content

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.sleep or methods in subprocess, inside an async def. coroutine

Development

When you wish to add a check to flake8-async please ensure the following:

  • This README.md gets a one line about your new warning
  • CHANGELOG gets added to a ## UNRELEASED section
  • 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.6

Add ASYNC101: blocking sync call in async function

22.3.10

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8-async-22.11.6.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

flake8_async-22.11.6-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file flake8-async-22.11.6.tar.gz.

File metadata

  • Download URL: flake8-async-22.11.6.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for flake8-async-22.11.6.tar.gz
Algorithm Hash digest
SHA256 e5f46eeba47faa06447337ee995099f51bc8f75fcae4ea189eb28b019319913e
MD5 86588733f5fdfc80f9ec27748ead33ff
BLAKE2b-256 e36db584fb511aacaf55610fe0a9efca25f07b8629a30844ca4c160479b421b3

See more details on using hashes here.

Provenance

File details

Details for the file flake8_async-22.11.6-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_async-22.11.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b61548027ad7db41fa3f102162ff06c2c78d33f7b6bad3489a62146f7f8efeff
MD5 ce99e4d01595109dd26a6eb976acb5aa
BLAKE2b-256 d9b0fbb503d1afcb4b8c9893d95c93ad6e2c2f360db2b082944bb64fe541adb4

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page