Fix tests and Lint/Ruff#4
Merged
Merged
Conversation
Adds [tool.ruff] config mirroring music21's flake8-quotes settings (inline/multiline/docstring all single) and applies ruff --fix across music21_tools/ and tools/ — 752 quote fixes in 17 files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copies .editorconfig and .pylintrc verbatim from music21base. Applies ruff check --fix (27 fixes across 7 files: bare except, not-in operator, dict.get fallthrough, etc.). Restores `harmony` and `meter` imports in theoryAnalyzer.py that ruff stripped as unused — they're used in doctests, which ruff can't see. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
211 fixes across 12 files, all autofixable in preview mode. No test regressions (127 passing / 22 failing, unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 fixes via ruff --unsafe-fixes across 9 files; transforms `x == True` → `x` and `x == False` → `not x`. No regressions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces ALL-CAPS shouting in print statements and tkinter UI labels with normal sentence case across audioSearchDemos and a few stragglers. Rewrites lines that mocked or laughed at the user — "YOU LOSE!! HAHAHAHA", "YOU ARE VERY SLOW!!! PLAY FASTER NEXT TIME!", "LOSER", etc. — into neutral phrasing. MIDI constants (NOTE_ON, END_OF_TRACK) and template tokens (SCOREGOESHERE) left alone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- .github/workflows/ci.yml runs ruff + pytest on Python 3.11-3.14 for pushes/PRs to master. - conftest.py filters TestExternal/TestSlow classes during pytest collection (matches music21's pytest plugin convention). - pyproject.toml bakes --doctest-modules, python_files='*.py', and testpaths='music21_tools' into pytest config so `uv run pytest` alone does the full sweep. - Renamed module-level testFoo helpers that weren't actually tests (demo*, runAll); aug30.py's test() → demo() + new TestExternal wrapper so the .show() call doesn't fire during routine collection. - README's "Running the tests" section trimmed to the essentials. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- ci.yml: trigger on PRs only (no push), and use actions/setup-python@v5 to provide the interpreter instead of `uv python install` so uv reuses GitHub's cached Python toolchain. - medren.py: collapse `isinstance(x, (Mensuration, notation.Divisione))` to `isinstance(x, MedievalMeter)` (their shared parent) in the two spots where both subclasses were checked together. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Therefore Capua's test needs to be split.
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 it feel more like an up-to-date project.