Whitespace cleanup - #2018
Merged
Merged
Conversation
314 docstrings ended with a blank line before their closing quotes, a few began with one after the opening quotes. Whitespace only: a doctest's expected output is already terminated by the end of the docstring, so the blank line was doing nothing. Covers docstrings proper plus the doc strings held in _DOC_ATTR dicts. AI-assisted (Claude)
383 E127/E128 continuation lines across 58 modules sat at an indent that had drifted from the bracket they belong to -- most of them badly over-indented, like serial.historicalDict's rows and scale's IntervalNetwork edge dicts, where the second line of each entry started fifteen columns right of the first. autopep8 --select=E12 did the reindent; `pycodestyle --select=E12 music21` is now silent. Four lines had to be rewrapped by hand: three that the new indent pushed past 100 characters (analysis/reduction, roman, stream/makeNotation) and one string in musicxml/test_xmlToM21 that had been hiding under an indent of 8. Also annotates the three graph.axis __init__s that returned mypy's annotation-unchecked note, which their bodies' inline annotations had earned. repeat.simplify and stream.filters.OffsetFilter.__init__ still raise it; both need a real signature rather than a bare `-> None` (simplify returns a Stream unless inPlace), so they are left alone. AI-assisted (Claude)
Aligned to the opening bracket, the tuple of articulation strings started at column 46 and every row after the first was mostly leading whitespace. Break after the paren instead and indent the strings one step, closing on its own line. Also restores repeat.py's continuation fix, lost when the file was reverted. AI-assisted (Claude)
Every entry after `(None,)` sat at column 21, aligned to nothing -- the dict opens with a hanging indent, so pycodestyle's E12 checks accept whatever the rows do as long as the first one is indented. AI-assisted (Claude)
Aligning to the opening bracket pushed the expected legend out to column 25 and its rows past that. Break after `assertEqual(` so both arguments sit one step in, which is where the list was before. AI-assisted (Claude)
'sound' in partStaffExporter's tagList sat eight columns right of the other four tags. Five multi-line `if` conditions had the same drift in a different form: the first `and` at the opening paren's column, the next one four further in, so neither row lined up with anything. Put every row of each on one column -- the +8 the rest of the codebase uses for a wrapped condition. pycodestyle's E12 checks pass either way; they accept several alternative indents once brackets nest, and only look at a row in isolation. AI-assisted (Claude)
Aligned to the opening paren, the method chain started at column 25 and its arguments ran out past 29. Break after the paren so the whole chain sits one step in, which is the spacing it had. AI-assisted (Claude)
Aligning to the opening bracket only pays when there is room to the right of it. scala's two cents assertions were aligned at column 73, leaving eight characters of usable width; variant's getElementsByOffset calls at 49-61. Break after the paren in those, so the arguments start one step in. Covers every call in the branch whose visual indent passed 40, plus the two stream/tests assertions and testMakeRestsB. variant's eight getElementsByOffset calls now share one shape, one argument per row. AI-assisted (Claude)
Both runners were listed as equals, with testSingleCoreAll marked "use before pushing to a PR" -- so it got run routinely, at 45 seconds against multiprocessTest's 10. That is a long time to leave someone waiting for an answer the parallel runner gives just as well. Says which one to use and confines the single-core runner to what it alone can tell you: a release check, a CI failure that will not reproduce, one core. AI-assisted (Claude)
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.
Whitespace CLEANUP!
Get your useless WHITESPACE CLEANUP here!