refactor: remove dead code and stale comments#229
Merged
Conversation
- Drop unreachable error branch in remote_file() after get_config_for_file() - Replace stale/misleading comment block in data_path() with one accurate line - Replace # type: () -> None comment annotation in main() with real -> None annotation Assisted-by: ClaudeCode:claude-sonnet-4.6
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
+ Coverage 72.51% 73.43% +0.91%
==========================================
Files 4 4
Lines 131 128 -3
==========================================
- Hits 95 94 -1
+ Misses 36 34 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eduardo-rodrigues
approved these changes
Jun 19, 2026
eduardo-rodrigues
left a comment
Member
There was a problem hiding this comment.
Thanks for the clean-up, Henry.
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.
🤖 AI text below 🤖
Three small low-risk cleanups tracked in issue #228:
Dead code in
remote_file()(src/skhep_testdata/remote_files.py): removed the unreachableif not config and raise_missingblock —get_config_for_file()already raisesRuntimeErrorfor unknown files, soconfigis never falsy after that call.Stale comments in
data_path()(src/skhep_testdata/local_files.py): replaced four speculative/incorrect comment lines (including "Download all not implemented", which is false) with a single accurate comment noting the file is fetched from themainbranch on GitHub.Comment-style type annotation in
main()(src/skhep_testdata/__main__.py): replaced# type: () -> Nonecomment annotation with the properdef main() -> None:syntax.All three changes pass
uv run --extra test pytestandprek -a --quiet(including mypy strict).Refs #228