Skip to content

refactor: inline find_solver_from_timeline into single caller - #641

Merged
anderdc merged 2 commits into
entrius:testfrom
mkdev5:fix/issue-inline-find-solver-from-timeline
Apr 21, 2026
Merged

refactor: inline find_solver_from_timeline into single caller#641
anderdc merged 2 commits into
entrius:testfrom
mkdev5:fix/issue-inline-find-solver-from-timeline

Conversation

@mkdev5

@mkdev5 mkdev5 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Inlined solver lookup into check_github_issue_closed by calling find_solver_from_cross_references(...) directly.
  • Moved Finding solver for {repo}#{issue_number} debug log to check_github_issue_closed.
  • Removed dead wrapper find_solver_from_timeline.
  • Removed delegation-only test class TestFindSolverFromTimeline.
  • Kept existing TestFindSolverFromCrossReferences behavior coverage intact.

Related Issues

Closes #640

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • uv run pytest tests/utils/test_github_api_tools.py -v
  • uv run pytest tests/utils/test_github_api_tools.py::TestFindSolverFromCrossReferences -v
  • uv run pytest tests/utils/test_github_api_tools.py::TestCheckGithubIssueClosed -v
  • uv run pre-commit run --all-files --show-diff-on-failure
  • SKIP=pytest uv run pre-commit run --all-files --hook-stage pre-push
  • uv run pyright
  • uv run pytest tests/ -v

Checklist

  • Branch created from test and intended target is test
  • Changes are scoped to issue and avoid unrelated edits
  • Tests updated to match refactor (delegation-only test removed)
  • Lint, format, type checks, and tests pass locally

@anderdc
anderdc merged commit a4bd2c2 into entrius:test Apr 21, 2026
3 checks passed
edwin-rivera-dev pushed a commit to edwin-rivera-dev/gittensor that referenced this pull request Apr 21, 2026
…s#641)

Co-authored-by: mkdev11 <MkDev11@users.noreply.github.com>
Co-authored-by: Ander <61125407+anderdc@users.noreply.github.com>
@anderdc anderdc added the refactor Code restructuring without behavior change label Apr 21, 2026
ebios-star added a commit to ebios-star/gittensor that referenced this pull request Apr 28, 2026
_single_paragraph in cli/issue_commands/help.py was a 3-line wrapper
around `' '.join(text.split())`, called from exactly one place
(StyledGroup.get_help). Inlining matches the pattern from entrius#748 / entrius#641
(remove single-use indirection); the inlined idiom is conventional
Python for collapsing whitespace and reads just as clearly at the
call site.

`grep -rn _single_paragraph` confirms no other call sites in
gittensor/, neurons/, or tests/. No behaviour change — full test
suite passes.
ebios-star added a commit to ebios-star/gittensor that referenced this pull request Apr 28, 2026
_get_contract_info_value in validator/issue_competitions/storage_utils.py
was a 3-line wrapper around `contract_info.value if hasattr(...) else
contract_info`, called from exactly one place (_extract_trie_id_bytes).
Inlining matches the pattern from entrius#748 / entrius#641 (remove single-use
indirection).

`grep -rn _get_contract_info_value` confirms no other call sites in
gittensor/, neurons/, or tests/. The hasattr fallback is preserved
verbatim, so all three substrate trie_id shapes covered by
test_get_contract_child_storage_key_accepts_multiple_trie_id_formats
(str/bytes/list) still resolve identically. Full test suite passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] inline find_solver_from_timeline into check_github_issue_closed

2 participants