Skip to content

Fix flake8 and style issues across Python modules - #8

Draft
endolith wants to merge 1 commit into
masterfrom
cursor/repo-lint-fixes-2589
Draft

endolith wants to merge 1 commit into
masterfrom
cursor/repo-lint-fixes-2589

Conversation

@endolith

Copy link
Copy Markdown
Owner

Summary

CI runs flake8 (including undefined-name checks) and pytest. This branch cleans up everything flake8 reported on the current tree so local and CI runs stay green.

Changes

  • midi_play.py: Removed unused imports (Fraction, randint, and several unused just_intonation symbols). Kept only Interval, Pitch, Chord, m3, M3, P4, P5, and P8. Added the blank lines PEP 8 expects between top-level definitions.
  • test_just_intonation.py: Removed trailing whitespace before closing parentheses in the Tenney-height loop; aligned the Weil-height continuation block; two spaces before the # utonal inline comment; dropped the redundant import pytest inside __main__ (fixes F811). Added # noqa: C901 on test_interval because splitting that test would be a large behavioral-no-op refactor.
  • just_intonation.py: Added # noqa: C901 on Chord.__init__ for the same reason (large branching constructor).

Verification

  • python3 -m flake8 . (full ruleset used in CI’s second step, without exit-zero) — 0 issues
  • pytest — 21 passed
Open in Web Open in Cursor 

- midi_play: drop unused imports; trim just_intonation imports to symbols
  that are used; add required blank lines between top-level definitions
- test_just_intonation: fix E202/E127/E261; remove redundant pytest import
  under __main__; suppress C901 on the monolithic test_interval
- just_intonation: suppress C901 on Chord.__init__ (large dispatcher)

Co-authored-by: endolith <endolith@gmail.com>
@cursor
cursor Bot force-pushed the cursor/repo-lint-fixes-2589 branch from 3053af5 to 940ba0f Compare June 12, 2026 04:44

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants