Fix lint errors, add black config, and CI lint check - #42
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
telnetsrv/andtests/; add__all__toaio.py,aio_ssh.py,paramiko_ssh.pyfor re-exported public API[tool.black]topyproject.tomlwithtarget-version(fixes Python 3.12 parse warning); reformat all files with blackper-file-ignores: F405in.flake8fortelnetsrvlib.py(star import fromconstantsis intentional)telnetsrv/_lint.pyregistered aslintconsole script —uv run lintruns black --check + flake8lintjob to CI (astral-sh/setup-uv+uv run lint) alongside existing test matrixCLAUDE.mdandAGENTS.mdto documentuv run lintTest plan
uv run lintpasses with no errorsuv run pytestpasses (361 tests)🤖 Generated with Claude Code