Commit 408ccb1
Align pre-existing context manager methods with repo idiom
Apply the same `__enter__`/`__exit__` typing pattern that PR #145 uses
for `TaskHubGrpcClient` (and that `BlobPayloadStore` already follows)
to three pre-existing context managers that were either untyped or
shadowed a builtin:
* `AsyncTaskHubGrpcClient.__aenter__` now returns the concrete type and
`__aexit__` takes `*args: object` with `-> None`.
* `TaskHubGrpcWorker.__enter__/__exit__` get the same treatment, also
removing the `type` parameter that shadowed the builtin.
* `EntityLock.__enter__/__exit__` get the same treatment; the file
already has `from __future__ import annotations` so the return
annotation is the bare class name.
Behavior is unchanged: each `__exit__` still delegates to its existing
teardown method (`close`/`stop`/`_exit_critical_section`), so the
gRPC resiliency teardown added in PR #135 continues to flow through
`TaskHubGrpcClient.close()` unchanged.
No changelog entry: per the repo's contributor guidance, internal-only
type-annotation refactors with no externally observable behavior change
are excluded from the changelog.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 4e45473 commit 408ccb1
3 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
792 | | - | |
| 792 | + | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
| 795 | + | |
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| |||
0 commit comments