Order NoneArg's union so make lint passes - #6
Open
tamohannes wants to merge 1 commit into
Open
Conversation
`make lint` fails on a clean clone with one error:
RUF036 `None` not at the end of the type union
--> src/nu/lang/args.py:68
Move `None` to the end of the alias. It costs the symmetry with the sibling
aliases, which all put the bare type first, but the alias is a quoted
annotation so the order carries no runtime or typing meaning.
Co-Authored-By: Claude Opus 5 (1M context) <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.
make lintis red on a clean clone, one error:Moved
Noneto the end. The alias is a quoted annotation, so the order carries no runtime or typing meaning.The cost is symmetry: every sibling alias puts the bare type first (
"int | Nu[int] | Any | Sentinel"), andNoneArgno longer reads that way. If you would rather keep the column lined up,# noqa: RUF036on that line is the other option and I am happy to switch it.make lintpasses with this.ruff format --checkstill reports 3 files, all python blocks inside markdown, untouched here.Note that
make testis still red on this branch: 5 failures, unrelated to this change, fixed in #4.🤖 Generated with Claude Code