Repository navigation
chore: clear ruff findings and fix docstring hover rendering - #20
Merged
Merged
Conversation
Remove unused imports and variables, modernize typing annotations, merge nested with statements, and drop a blind except in a test. Add per-file ignores for the integration test skeleton and .pyi __all__ ordering, and a TRY004 noqa on validate_graph, whose ValueError is a public contract.
Nested bullets under an Args entry get joined into one paragraph in the language server's hover rendering, and ** shows up as literal asterisks. Describe the verbose modes inline in train and evaluate, and use plain labels in the Notes sections.
The public names load lazily, so help(aether) and hover showed nothing. Add a short orientation docstring to __init__.py and the .pyi stub, which language servers resolve in its place.
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.
Context
Ruff reported 49 findings, none on recently touched code, and several docstrings
rendered badly in editor hovers. This PR clears the lint backlog and fixes the
docstrings. It also adds a package docstring, because
help(aether)and hovershowed nothing useful with the lazy-loaded public names.
Three commits:
chore(lint): mostly mechanical (ruff --fixfor unused imports, typing syntax,nested
with, import order). Review the test files withgit diff -w.docs: docstring-only.docs(aether): docstring-only.Lint
Auto-fixed: unused imports,
Optional/Union/Tupleannotations, nestedwithstatements, a redundant
return None, import order.Fixed by hand:
adam_base_suite.py: removed atry/except Exceptionthat only calledself.fail. A kernel failure now surfaces as a test error with its traceback.model_base_suite.py:target_devicewas computed but the same expression wasrepeated inline. Both
model.to(...)calls now use the variable.test_max_pool2d.py: dropped an unusedlayer =.batchnorm_kernel.py:variant: str | None = None.Ignored on purpose:
RUF022for*.pyi: stub__all__lists are grouped by topic, not sorted.F401andPIE790for the integration test skeleton: its placeholder importsand
passbodies are intentional.TRY004onLoss.validate_graph: inlinenoqa, because itsValueErroris atested public error type.
Docstrings
The language server's hover joins nested bullets under an
Argsentry into oneparagraph, and shows
**as literal asterisks. Theverboseentries inModel.train()andModel.evaluate()now describe their modes inline, and the**Label:**markers in Notes sections are plain labels (9 places across 4 files).aether/__init__.pyandaether/__init__.pyiget a short package docstring: whatthe framework is, lazy loading, and that the backend is chosen with
Model.to().It leaves out class lists and the version, which the lazy maps, stub and package
metadata already cover.
Behavior changes
None.
Testing
python3 -m unittest discover tests: 1158 tests pass (72 skipped), run in theROCm devcontainer.
ruff check .passes.Follow-ups (out of scope)
pyproject.tomlstill says1.1.0. The version bump for the next release goesin the Windows-fix PR.