skillfed

flake8-async

A highly opinionated flake8 plugin for Trio-related problems.

flake8-async v26.7.1 351.9K downloads/30d#7,317 on PyPI27
Permissive license MIT Active released

What it is and what it does

flake8-async is a flake8 plugin that integrates async-specific linting rules for Trio, AnyIO, and asyncio code. It detects a range of issues from outright bugs to idiom violations that may signal misunderstandings of async patterns. The plugin reports problems using ASYNC-prefixed error codes and is designed to catch issues that general linters might miss in async contexts.

The plugin depends on libcst for code parsing and integrates directly into flake8's workflow. It is actively maintained and supports Python 3.9 through 3.13. The description notes it can be opinionated and potentially noisy depending on your coding style, and suggests pairing it with flake8-bugbear for broader coverage.

Use it for:

  • Catch common async bugs and antipatterns in Trio-based applications before they reach production.
  • Enforce consistent async idioms across a team's asyncio or AnyIO codebases during code review.
  • Identify dead or pointless async code that may indicate misunderstanding of concurrency patterns.
  • Detect likely performance issues in async functions that could cause bottlenecks or blocking.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A flake8 plugin that detects async-related issues in code using Trio, AnyIO, or asyncio, flagging bugs, dead code, performance problems, and idiom violations.

Yes, if you write async code with Trio, AnyIO, or asyncio and want linting coverage beyond general flake8 checks. The low install friction, active maintenance, MIT license, and zero known vulnerabilities make it a safe addition. Be aware it is opinionated and may flag code you consider acceptable; review its rule documentation to decide if its strictness matches your team's standards.

Install

flake8-async on PyPI

pip

pip install flake8-async

uv

uv add flake8-async

poetry

poetry add flake8-async

Installing flake8-async

Before you install

Low friction installation with a single runtime dependency (libcst). The project is actively maintained with a recent release and no known vulnerabilities.

License in practice

MIT license is permissive; you can use this plugin freely in commercial and private projects with minimal restrictions.

Quickstart

pip install flake8-async

# Then run flake8 on your async code:
flake8 your_async_file.py

# The plugin integrates automatically with flake8 and reports ASYNC-prefixed errors.

Requires Python 3.9 or later and an existing flake8 installation.

Verify before relying

  • Whether the plugin's checks overlap significantly with ruff's async checks or if they complement each other.
  • How noisy the checks are in typical async codebases and whether filtering is commonly needed.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — libcst
Maintenance actively maintained — 17 days since the last release
Last repo commit
First released
Downloads 351,920/month — #7,317 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: flake8_async-26.7.1-py3-none-any.whl

Development Status :: 3 - AlphaFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

flake8 async lintertrio asyncio code checkerasync code quality pluginflake8 async bugsanyio trio linter
async-lintingtrio-anyio-asyncio

More Quality Assurance packages