Apply coding best practices: strict mypy, remove future annotations, fix async concurrency, hoist imports#7
Merged
Conversation
…ns, improve async concurrency, hoist imports Agent-Logs-Url: https://github.com/codeSamuraii/pyfuse/sessions/b525c00f-293b-4d49-8924-ad15d185248a Co-authored-by: codeSamuraii <17270548+codeSamuraii@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
codeSamuraii
April 16, 2026 06:36
View session
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.
Applies coding best practices across the codebase: strict mypy compliance, proper import placement, removal of unnecessary
from __future__ import annotations, and fixing a sequential async pattern that prevented concurrent execution.mypy strict: 7 errors → 0
_protocol.py: explicitintannotation ondecode_headerto fixno-any-returnworker.py,remote.py: assert guards before accessing nullable_sandboxremote.py:TYPE_CHECKINGimport forDockerSandboxforward referenceredis.py:type: ignore[import-not-found]for optional dependencyRemove
from __future__ import annotationsRemoved from
docker.pyandguest_agent.py. Project targets>=3.10so PEP 604 unions work at runtime. String annotations already in place where needed (__aenter__).Hoist imports
__main__.py:import shutilmoved to top (was duplicated inline in 3 CLI handlers)docker.py:_progress_callbackimport moved to top (no circular dep risk)Fix async concurrency in
.map()_make_map_methodwas awaiting submissions and results sequentially, defeating the purpose of batch execution:Both phases (submit all tasks, then collect all results) now run concurrently.