refactor(sync): align __all__ with the package public surface#986
Merged
tcoratger merged 1 commit intoJun 12, 2026
Merged
Conversation
Match the export convention used by every sibling node package: place __all__ after the imports and sort its entries alphabetically. The list previously sat before the imports in import order, which diverged from the chain, storage, validator, genesis, and metrics packages. The unused future-annotations import is dropped as well, since this module carries no annotations and no sibling uses it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Reconcile the
__all__export block in the sync package init so it follows the same policy as every siblingnodepackage.The inconsistency
Every sibling package init (chain, storage, validator, genesis, metrics) follows one convention:
__all__The sync init diverged on both points:
__all__sat before the importsSyncService,BlockCache,NetworkRequester,PeerManager), not alphabeticallyIt also carried a
from __future__ import annotationsthat no sibling init uses and that this module does not need — there are no annotations in the file.The fix
__all__below the imports.BlockCache,NetworkRequester,PeerManager,SyncService.The public surface is unchanged — all four names are imported by real external callers (
node.py,validator/service.py,networking/service/service.py,chain/service.py,api/aggregator_controller.py), so this is purely a policy alignment with no behavioral change. No backward-compat shims added.Verification
uv run pytest tests/node/sync/— 142 passedjust check— all checks pass🤖 Generated with Claude Code