Skip to content

fix: resolve NameError in rl_cli by moving import before usage - #16798

Closed
Kailigithub wants to merge 1 commit into
NousResearch:mainfrom
Kailigithub:fix/rl-cli-import-order
Closed

Kailigithub wants to merge 1 commit into
NousResearch:mainfrom
Kailigithub:fix/rl-cli-import-order

Conversation

@Kailigithub

Copy link
Copy Markdown
Contributor

Summary

Resolves a NameError at module import time in rl_cli.py. The function get_hermes_home() was called on line 32, but its import from hermes_constants was not placed until line 63 — causing the module to crash immediately on any import rl_cli or python rl_cli.py.

Fix

Moved from hermes_constants import get_hermes_home, OPENROUTER_BASE_URL to before the first usage at line 32. Removed the now-redundant duplicate import from the Config Loading section.

Verification

  • python3 -c "import rl_cli" now succeeds with no errors
  • ruff check rl_cli.py --select=F821 passes with no issues
  • No changes to any other files in the codebase

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have labels Apr 28, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

Duplicate of #6732 — same fix (reorder imports in rl_cli.py to move get_hermes_home before first usage).

@alt-glitch alt-glitch added the duplicate This issue or pull request already exists label Apr 28, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the contribution! This fix is already present on mainget_hermes_home is imported at line 30 of rl_cli.py, before its first usage at line 34, so the NameError this PR addresses no longer exists in the current codebase.

This is an automated hermes-sweeper review.

Evidence:

Closing as already implemented on main.

@teknium1 teknium1 closed this Jun 10, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants