Skip to content

refactor: remove dead code and stale comments#229

Merged
eduardo-rodrigues merged 2 commits into
mainfrom
chore/review-cleanups
Jun 19, 2026
Merged

refactor: remove dead code and stale comments#229
eduardo-rodrigues merged 2 commits into
mainfrom
chore/review-cleanups

Conversation

@henryiii

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Three small low-risk cleanups tracked in issue #228:

  1. Dead code in remote_file() (src/skhep_testdata/remote_files.py): removed the unreachable if not config and raise_missing block — get_config_for_file() already raises RuntimeError for unknown files, so config is never falsy after that call.

  2. 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 the main branch on GitHub.

  3. Comment-style type annotation in main() (src/skhep_testdata/__main__.py): replaced # type: () -> None comment annotation with the proper def main() -> None: syntax.

All three changes pass uv run --extra test pytest and prek -a --quiet (including mypy strict).

Refs #228

- 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

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.43%. Comparing base (321dc7e) to head (21c40d3).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henryiii henryiii marked this pull request as ready for review June 15, 2026 19:14

@eduardo-rodrigues eduardo-rodrigues left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clean-up, Henry.

@eduardo-rodrigues eduardo-rodrigues merged commit d0c32ec into main Jun 19, 2026
8 checks passed
@eduardo-rodrigues eduardo-rodrigues deleted the chore/review-cleanups branch June 19, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants