Skip to content

refactor: remove unused SharedSession helper (#77)#86

Merged
Faerkeren merged 1 commit into
mainfrom
refactor/remove-shared-session
May 27, 2026
Merged

refactor: remove unused SharedSession helper (#77)#86
Faerkeren merged 1 commit into
mainfrom
refactor/remove-shared-session

Conversation

@Faerkeren
Copy link
Copy Markdown
Contributor

Closes #77.

Issue assessment

Valid and actionable. Verified that SharedSession (defined at src/haclient/config.py:131-150 on main) has no importers or instantiations anywhere in the codebase or test suite. Session ownership lives directly inside AiohttpRestAdapter and AiohttpWebSocketAdapter, so the helper was pure dead code, and was the only reason config.py imported aiohttp.

Fix

  • Deleted the SharedSession class from src/haclient/config.py.
  • Removed the now-unused import aiohttp.
  • Updated the module docstring to drop the stale reference to "aiohttp session ownership".

No production code paths or public re-exports change (SharedSession was never exported from haclient.__init__).

Checks run

  • ruff check src tests — clean
  • ruff format --check src tests — clean (57 files already formatted)
  • mypy src — Success: no issues found in 38 source files
  • pytest tests/ --cov=haclient --cov-report=term-missing --cov-fail-under=95316 passed, coverage 97.18% (above the 95% gate)

SharedSession was never imported or instantiated by production code or
tests. Session ownership is handled directly by AiohttpRestAdapter and
AiohttpWebSocketAdapter, so the helper served no runtime purpose and was
the sole reason config.py needed to import aiohttp.

Delete the class, drop the now-unused aiohttp import, and tighten the
module docstring accordingly.
@Faerkeren Faerkeren merged commit dd56d4d into main May 27, 2026
12 checks passed
@Faerkeren Faerkeren deleted the refactor/remove-shared-session branch May 27, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused SharedSession configuration helper

1 participant