Repository navigation
Trim comments that repeat the code - #255
Draft
BlivionIaG wants to merge 2 commits into
Draft
BlivionIaG wants to merge 2 commits into
BlivionIaG wants to merge 2 commits into
Conversation
Drop narration from the 3.0 rewrite that restates the following statement, and leave comments that explain why. Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.com>
Ruff format rejects the empty line that used to separate a class docstring from the first method. Co-authored-by: BlivionIaG <BlivionIaG@users.noreply.github.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.
Purpose
Remove comments and docstrings from the owner's FetchCord 3.0 rewrite that only restate the next line. Comments that explain why stay. No behavior, dependency, or logic changes.
Deleted
fetch_cord/resources/fetchcord_cmds.yml— 17 step comments in the Windows, Linux, and Darwin memory scripts (total, available, convert, used, output, plus Darwin's page-size steps).fetch_cord/__main__.py— 7 section labels: component ids, stop event, load config, load cycles, main loop, loop through cycles, and "reconnect if client_id changed".fetch_cord/cycle.py— theclose_connectiondocstring, and the two comments aboveclose_connection()/raiseinupdate.fetch_cord/resources/systemd_service.py— one-line docstrings onget_systemd_user_dir,systemd_cmd,install,uninstall,enable,disable,start,stop, andstatus, plus the wholeget_service_file_urldocstring (the summary restates the function; the Args/Returns block restates the signature).fetch_cord/tools.py—trunk-ignorecomments for bandit B404, B602 onexec_bash, B603, and B607. A repo search findstrunkonly on these suppressions, and Trunk is not invoked anywhere.tests/test_fetch_cord.py— 25 class and method docstrings that only restate the test name (Test …, plussetUp's "Set up test fixtures"). Three blank lines that sat under the deletedTestConfig,TestCycle, andTestToolsclass docstrings also went, becauseruff formatrejects that empty line once the docstring is gone.snapcraft.yaml— the stale sentence that the snap is unmaintained because core18 cannot ship Python 3.12. The file already setsbase: core24.Net diff against
master: 78 deletions, 1 insertion (the shortened snap description line).Kept on purpose
fetch_cord/__main__.py: the CLI-override note, the "Discord only allows one RP" note, and the mypy note about the signal handler. Later comments that explain a choice (pause, one snapshot per rotation, native fetchers) are untouched.fetch_cord/cycle.py: thewaitdocstring, which explains whyinterval_durationis ignored.fetch_cord/resources/systemd_service.py:validate_systemd_cmd's "prevent injection" docstring.tests/test_fetch_cord.py: docstrings that give a reason, includingtest_cycle_wait_returns_promptly_when_stopped, the integration test that explains provider merge,TestFetchFunctions's "standalone, no module imports" note, the fastfetch parser and POSIX script class notes, and inline comments that explain an assertion.snapcraft.yaml: "Prefer pip or Homebrew" and the reason this file still exists (existing snap listings).fetch_cord/tools.py: thetrunk-ignore(bandit/B602)aboveshell=shellinrun_command.Non-overlap with #253 and #254
Open PRs when this branch was cut: #253 and #254 only.
This branch does not touch any packaging file (#254:
pyproject.toml,requirements.txt,MANIFEST.in,fetchcord.spec,Formula/fetchcord.rb,uv.lock).It does not edit a line, or a line next to one, that #253 changes or deletes. Skipped because #253 already removes them:
fetch_cord/tools.py:# trunk-ignore(bandit/B602)onshell=shellinsiderun_command(deleted together with theshellparameter).tests/test_fetch_cord.py: the docstrings ontest_cycle_wait_with_intervalandtest_run_command_with_shell(those tests are deleted in Remove unused FetchCord 3.0 API that production no longer calls #253).Merged cleanly in both directions against
cursor/delete-dead-fetchcord-api-f3ad(#253) andcursor/packaging-tooling-cleanup-86d5(#254).Proof
pip install -e ".[dev]"was run first. The interpreter on this machine ispython3; the commands above were run with that interpreter.Assistance
This change was made with AI assistance.