Skip to content

Refactor endpoint mixins for explicit sync/async dispatch#676

Merged
fderuiter merged 1 commit intomainfrom
refactor/explicit-sync-async-mixins-6718542356546304512
Feb 18, 2026
Merged

Refactor endpoint mixins for explicit sync/async dispatch#676
fderuiter merged 1 commit intomainfrom
refactor/explicit-sync-async-mixins-6718542356546304512

Conversation

@fderuiter
Copy link
Owner

Refactored ListEndpointMixin, FilterGetEndpointMixin, and PathGetEndpointMixin to use explicit _sync and _async methods instead of relying on runtime type inspection and is_async flags. Updated GenericEndpoint to enforce strict typing for client access. This aligns with the "Explicit > Implicit" and "Sync/Async Parity" architectural principles. All unit tests were updated to reflect the new internal method names.


PR created automatically by Jules for task 6718542356546304512 started by @fderuiter

- Split `_list_impl` into `_list_sync` and `_list_async` in `ListEndpointMixin`.
- Split `_get_impl` and `_get_impl_path` into explicit sync/async variants in `FilterGetEndpointMixin` and `PathGetEndpointMixin`.
- Update `GenericEndpoint` to support strict client typing via `_require_sync_client` and `_require_async_client`.
- Remove runtime type checking (`isawaitable`, `is_async` flags) from core endpoint logic.
- Update unit tests to mock specific sync/async implementation methods.

This change improves strict typing, reduces cognitive load, and eliminates implicit control flow in favor of explicit method dispatch.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@fderuiter fderuiter marked this pull request as ready for review February 18, 2026 23:52
@fderuiter fderuiter merged commit 5e0e107 into main Feb 18, 2026
13 checks passed
@fderuiter fderuiter deleted the refactor/explicit-sync-async-mixins-6718542356546304512 branch February 18, 2026 23:52
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

Comments