Skip to content

Fix lint errors, add black config, and CI lint check - #42

Merged
ianepperson merged 16 commits into
masterfrom
fix-lint-style
Jun 20, 2026
Merged

Fix lint errors, add black config, and CI lint check#42
ianepperson merged 16 commits into
masterfrom
fix-lint-style

Conversation

@ianepperson

@ianepperson ianepperson commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove unused imports across telnetsrv/ and tests/; add __all__ to aio.py, aio_ssh.py, paramiko_ssh.py for re-exported public API
  • Add [tool.black] to pyproject.toml with target-version (fixes Python 3.12 parse warning); reformat all files with black
  • Add per-file-ignores: F405 in .flake8 for telnetsrvlib.py (star import from constants is intentional)
  • Add telnetsrv/_lint.py registered as lint console script — uv run lint runs black --check + flake8
  • Add lint job to CI (astral-sh/setup-uv + uv run lint) alongside existing test matrix
  • Update CLAUDE.md and AGENTS.md to document uv run lint

Test plan

  • uv run lint passes with no errors
  • uv run pytest passes (361 tests)
  • CI lint + test jobs pass on GitHub Actions

🤖 Generated with Claude Code

ianepperson and others added 16 commits June 20, 2026 15:37
- Remove genuinely unused imports across telnetsrv/ and tests/
- Add __all__ to aio.py, aio_ssh.py, paramiko_ssh.py for re-exported public API
- Suppress F405 in .flake8 per-file-ignores (star import in telnetsrvlib.py is intentional)
- Add [tool.black] to pyproject.toml with target-version to fix Python 3.12 parse warning
- Black-reformat all files for consistency
- Add telnetsrv/_lint.py and register as `lint` console script (uv run lint)
- Add lint job to CI using astral-sh/setup-uv + uv run lint

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AsyncInputBashLike and AsyncTelnetToPtyHandler are public classes
(no _ prefix) defined in their modules but were absent from __all__.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Public class missing from __all__, consistent with AsyncTelnetToPtyHandler
fix in aio_ssh.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lists all five public names: cmd, Commands, InputSimple, InputBashLike,
TelnetHandlerBase. Excludes _decorate (private) and star-imported constants.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
More descriptive name clarifies the function's role.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_decorate_cmd and cmd both get docstrings describing their role
and usage patterns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pytest collected the class as a test due to the Test prefix, causing
a PytestCollectionWarning. The class is not a test — rename clarifies intent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace actions/setup-python + pip install with astral-sh/setup-uv
and uv sync/run, consistent with the lint job and local dev workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 3.13 and 3.14 classifiers to pyproject.toml
- Add 3.14 to CI test matrix (3.13 already present)
- Keep black target-version capped at py312 (py39 is binding constraint;
  higher versions trigger AST parse warnings on the local 3.12 runtime)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump actions/checkout v4 → v7, astral-sh/setup-uv v5 → v8
  (v4/v5 targeted Node.js 20 which is deprecated on GitHub Actions)
- Add allow-prereleases: true so uv installs Python 3.14 beta
  (without it the 3.14 matrix job silently disappears)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setup-uv does not publish floating major-version tags; use v8.2.0.
Likewise pin checkout to v7.0.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both are not valid inputs for setup-uv@v8.2.0; python-version alone suffices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
start_feed may drain channel and exit before task.cancel() fires,
making await task return None instead of raising CancelledError.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ianepperson
ianepperson merged commit 1f01779 into master Jun 20, 2026
7 checks passed
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.

1 participant