Repository navigation
Tags
Tags
Add ASYNC128 task-status-never-started (#474) Warns about startable functions (i.e. taking a `task_status` parameter, or a parameter annotated as `TaskStatus`) that never call `task_status.started()`, which makes `nursery.start()` / `TaskGroup.start()` calls on them fail or block forever. The check is intentionally strict, per the issue: passing `task_status` on to a helper function or aliasing it does not count, and any direct call counts regardless of reachability. Stub bodies (overloads, protocols, abstract methods) are excluded. Closes #471 Claude-Session: https://claude.ai/code/session_01EJGxyMtQSge3dVQpw19rZX Co-authored-by: Claude <noreply@anthropic.com>
Guard release version info against typos and desync (#473) Release 27.7.1 escaped with a year-typo'd changelog header while __version__ still said 26.6.1: CI only checked that the changelog head was >= __version__, and the release job's update_version() silently patched the workspace copy before tagging and uploading (#469). - New always-on check: the newest changelog version may never be dated in the future, and its month must be a valid calendar month. - In --ensure-tag (release) mode, require the changelog head, __version__, and the usage.rst pre-commit rev to be exactly equal, and no longer run update_version() there - a mismatch now fails the release instead of being patched on the fly. Pre-commit keeps the auto-fix behavior. - Before creating a new tag for a x.y.1 release, require its year.month to be the current (or immediately previous) month; patch releases of an existing series are exempt. Tag existence is now checked via ls-remote, since a shallow CI checkout has no local tags. - Rename the 27.7.1 changelog entry to the intended 26.7.1 and sync __version__ and the usage.rst example accordingly. Claude-Session: https://claude.ai/code/session_01Cqsspf84UPK1Gg5rka8hRz Co-authored-by: Claude <noreply@anthropic.com>
Support and encourage use of httpx2 (#461) The original httpx package is no longer maintained; httpx2 is the continuation of the project, maintained by Pydantic. - Add ASYNC127 unmaintained-httpx: triggers on any import of httpx, recommending httpx2 to keep getting security updates. - ASYNC210 and ASYNC212 now detect blocking calls made through httpx2 identically to httpx ones. - ASYNC210/211/212 messages now recommend httpx2.AsyncClient instead of httpx.AsyncClient. https://claude.ai/code/session_01LmC7WhyCTN11M9xBycd4Xu Co-authored-by: Claude <noreply@anthropic.com>
Fix ASYNC200 regression on `foo("x").bar` patterns (#26.4.2) (#455)
* Fix ASYNC200 regression on `foo("x").bar` patterns (#26.4.2)
The canonical-qualname resolver introduced in 26.4.1 recursed through
ast.Call/cst.Call unconditionally, which collapsed nested calls inside an
attribute chain into a dotted name (e.g. `read_session("a").get` resolved
to `read_session.get`). This caused user-configured ASYNC200 patterns
like `*session.get` to flag method calls on the return value of an
unrelated function -- a false positive that did not exist in 25.5.3.
Only unwrap Call at the outermost position; calls inside an attribute
chain now make the whole expression unresolvable (None), since the
target of the trailing attribute is a return value we can't determine
statically. Top-level shapes like `trio.open_nursery()` still resolve
as before.
Adds:
- eval-file regression case in tests/eval_files/async200.py
- direct unit test for resolve_canonical_ast / resolve_canonical_cst
- changelog entry for 26.4.2 and version bump
https://claude.ai/code/session_01BWheK2fZPMDhbfS1LCR2zc
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Satisfy pre-commit: hoist import + black reformat
- Move `resolve_canonical_ast` / `resolve_canonical_cst` import to the top
of tests/test_flake8_async.py (ruff PLC0415 / import-not-at-top).
- Black reformat of `_resolve_attr_chain_ast` signature.
https://claude.ai/code/session_01BWheK2fZPMDhbfS1LCR2zc
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
PreviousNext