Skip to content

fix: annotate TimersBroker._subscribers as WeakSet for ty 0.0.87 - #107

Merged
lesnik512 merged 1 commit into
mainfrom
fix/ty-0.0.87
Oct 14, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/ty-0.0.87

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Fixes #106.

The scheduled dependency check picked up ty 0.0.87, which turns on invalid-mutable-override by default and now checks overrides of attributes declared in __init__. It reports five errors on main.

  • TimersBroker annotated _subscribers and _publishers as list, but faststream's Registrator sets both to a WeakSet. _subscribers is now annotated as WeakSet[TimersSubscriber], the same as faststream-outbox, with an ignore because WeakSet is invariant. Nothing reads _publishers, so its annotation is gone, along with the import it used.
  • _outer_config: TimersBrokerConfig narrows faststream's BrokerConfig in three places. faststream's bases aren't generic over the config, so each line gets a per-line ignore.

Locally with ty 0.0.87, just lint-ci is clean and just test-ci passes (168 passed, 100% coverage).

@lesnik512
lesnik512 merged commit 43746e6 into main Oct 14, 2026
13 checks passed
@lesnik512
lesnik512 deleted the fix/ty-0.0.87 branch October 14, 2026 14:12
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.

Scheduled dependency check failed

1 participant