Adopt uv dependency groups and enable ruff SIM cleanups#409
Merged
RonnyPfannschmidt merged 2 commits intoJul 21, 2026
Conversation
Move testing deps to PEP 735 dependency-groups with a lockfile for reproducible local setup, and apply SIM-driven style simplifications. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Cursor Grok 4.5 <grok@x.ai>
There was a problem hiding this comment.
Pull request overview
This PR updates Execnet’s Python tooling configuration to use uv dependency groups (PEP 735) with a committed lockfile for reproducible development installs, and enables Ruff’s SIM rules while applying related simplifications across gateway/rsync/script code.
Changes:
- Add
uv.lock, configure[dependency-groups]and[tool.uv], and enable RuffSIMlinting. - Apply
SIM-driven refactors (context managers for file IO,contextlib.suppress, small conditional simplifications) in gateway/rsync/script modules. - Minor typing cleanup (e.g., use
set[...]instead ofMutableSet).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Adds a uv lockfile for reproducible local environment setup. |
| pyproject.toml | Moves test deps to dependency groups, sets uv defaults, and enables Ruff SIM. |
| src/execnet/gateway_base.py | SIM cleanups and small refactors in channel lifecycle and IO setup. |
| src/execnet/rsync.py | Uses context-manager file reads and renames a local variable for clarity. |
| src/execnet/rsync_remote.py | Uses contextlib.suppress and context-manager file IO. |
| src/execnet/script/shell.py | Switches file read to a with open(...) context manager. |
| src/execnet/script/socketserver.py | Adds SIM115 suppression for a debug log handle; simplifies CLI arg parsing. |
| src/execnet/script/socketserverservice.py | Adds SIM115 suppression for redirected stdout/stderr handle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keep OSError suppression in Channel.__del__, simplify _no_longer_opened without a dummy callback, ignore SIM105/SIM115, and keep the published testing extra for pip install. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Cursor Grok 4.5 <grok@x.ai>
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.
Summary
dependency-groups, add[tool.uv]defaults, and commituv.lockfor reproducible local setup withuv sync.SIMand apply related simplifications (contextlib.suppress,with open, clearer exception handling) in gateway/rsync/script code.Test plan
uv syncinstalls the testing group cleanlytox/ CI test matrix still passesSIMenabledMade with Cursor