fix: resolve ruff lint errors in hermes and openharness adapters#1458
Merged
hijzy merged 1 commit intoMemTensor:mainfrom Apr 10, 2026
Merged
fix: resolve ruff lint errors in hermes and openharness adapters#1458hijzy merged 1 commit intoMemTensor:mainfrom
hijzy merged 1 commit intoMemTensor:mainfrom
Conversation
- Remove unused imports (os, Dict, List) and add contextlib - Replace try-except-pass with contextlib.suppress for cleaner error handling - Use list unpacking [*tsx.split(), ...] instead of concatenation - Use context manager (with open) for file handling in daemon_manager - Add noqa: E402 for intentional late imports after sys.path manipulation - Fix deprecated typing.Dict/List → builtin dict/list
3 tasks
hijzy
added a commit
that referenced
this pull request
Apr 10, 2026
…1459) ## Summary - Apply `ruff format` auto-formatting to `capture.py` and `recall.py` in openharness adapter scripts - Adds missing blank lines between import groups and after module-level statements - Fixes dict literal indentation style in `capture.py` - Removes unused `import os` in `recall.py` Follow-up to #1458. ## Files Changed - `adapters/openharness/scripts/capture.py` - `adapters/openharness/scripts/recall.py` ## Test Plan - [x] `ruff check apps/memos-local-plugin` passes - [x] `ruff format --check apps/memos-local-plugin` passes - [ ] Verify openharness capture/recall scripts still function correctly
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
os,Dict,List) and addcontextlibwhere neededtry-except-passpatterns withcontextlib.suppress()for cleaner error suppression (SIM105)[*tsx.split(), str(candidate)]instead of concatenation (RUF005)with open(...)context manager for file handling indaemon_manager.py(SIM115)# noqa: E402for intentional late imports aftersys.pathmanipulationtyping.Dict/typing.Listwith builtindict/list(UP035)All 20 remaining ruff lint errors resolved.
ruff check apps/memos-local-pluginnow passes cleanly.Files Changed
adapters/hermes/__init__.pyadapters/hermes/bridge_client.pyadapters/hermes/config.pyadapters/hermes/daemon_manager.pyadapters/openharness/scripts/bridge_client.pyadapters/openharness/scripts/config.pyadapters/openharness/scripts/daemon_manager.pyTest Plan
ruff check apps/memos-local-pluginpasses with no errors