Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changelog

`CalVer, YY.month.patch <https://calver.org/>`_

25.8.1
======
- Added :ref:`ASYNC914 <async914>` redundant-lowlevel-checkpoint.
- :ref:`ASYNC910 <async910>`, :ref:`ASYNC911 <async911>` and :ref:`ASYNC913 <async913>` can now autofix asyncio code by inserting `asyncio.await(0)`.

25.7.1
======
- :ref:`ASYNC102 <async102>` no longer triggered for asyncio due to different cancellation semantics it uses.
Expand Down
4 changes: 4 additions & 0 deletions docs/rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ _`ASYNC913` : indefinite-loop-no-guaranteed-checkpoint
An indefinite loop (e.g. ``while True``) has no guaranteed :ref:`checkpoint <checkpoint>`. This could potentially cause a deadlock.
This will also error if there's no guaranteed :ref:`cancel point <cancel_point>`, where even though it won't deadlock the loop might become an uncancelable dry-run loop.

_`ASYNC914`: redundant-lowlevel-checkpoint
Warns on calls to :func:`trio.lowlevel.checkpoint`, :func:`anyio.lowlevel.checkpoint` and :func:`asyncio.sleep` that are not required to satisfy `ASYNC910`_, `ASYNC911`_ and `ASYNC912`_.
Excessive calls to the scheduler will impact performance, and bloat the code, but sometimes you do want to trigger checkpoints at specific points and can safely ignore this warning.

.. _autofix-support:

Autofix support
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ adding the following to your ``.pre-commit-config.yaml``:
minimum_pre_commit_version: '2.9.0'
repos:
- repo: https://github.com/python-trio/flake8-async
rev: 25.7.1
rev: 25.8.1
hooks:
- id: flake8-async
# args: ["--enable=ASYNC100,ASYNC112", "--disable=", "--autofix=ASYNC"]
Expand Down
2 changes: 1 addition & 1 deletion flake8_async/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@


# CalVer: YY.month.patch, e.g. first release of July 2022 == "22.7.1"
__version__ = "25.7.1"
__version__ = "25.8.1"


# taken from https://github.com/Zac-HD/shed
Expand Down
Loading
Loading