Skip to content

Remove pyrefly 1897 workarounds and use the strict preset - #3567

Merged
adamtheturtle merged 3 commits into
mainfrom
adamtheturtle/remove-closed-pyrefly-1897-refs
Sep 7, 2026
Merged

Remove pyrefly 1897 workarounds and use the strict preset#3567
adamtheturtle merged 3 commits into
mainfrom
adamtheturtle/remove-closed-pyrefly-1897-refs

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Sep 7, 2026

Copy link
Copy Markdown
Member

facebook/pyrefly#1897 (support for copy.replace) was closed on 2026-07-08 and the fix is in the pinned pyrefly 1.2.0. This removes the See ... comments, the # pyrefly: ignore[bad-argument-type] comments, and the explicit ImageTarget annotations that only existed to work around it.

It also switches the pyrefly config to preset = "strict" (see https://pyrefly.org/en/docs/configuration/), which enables unused-ignore so stale ignore comments like these fail the check in future, along with implicit-any, missing-override-decorator and others. The handful of new errors are fixed: @override decorators, a typed sort-key function instead of a lambda, and two typed empty containers.

pyrefly, mypy and all prek hooks pass.

🤖 Generated with Claude Code

pyrefly 1.2.0 supports copy.replace, so the explicit annotations and
ignore comments are no longer needed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 7, 2026
The strict preset enables unused-ignore along with implicit-any,
missing-override-decorator and other checks. Fix the new errors:
add @OverRide decorators, replace an untyped lambda sort key with a
typed function, and type two empty containers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant