Skip to content

Commit

Permalink
style: Remove unneeded trailing commas
Browse files Browse the repository at this point in the history
  • Loading branch information
edudobay committed Nov 15, 2021
1 parent 2e79a12 commit 2217897
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion mingus/core/intervals.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def get_interval(note, interval, key="C"):
This will produce mostly theoretical sound results, but you should use
the minor and major functions to work around the corner cases.
"""
intervals = [(notes.note_to_int(key) + x) % 12 for x in [0, 2, 4, 5, 7, 9, 11,]]
intervals = [(notes.note_to_int(key) + x) % 12 for x in [0, 2, 4, 5, 7, 9, 11]]
key_notes = keys.get_notes(key)
for x in key_notes:
if x[0] == note[0]:
Expand Down
30 changes: 15 additions & 15 deletions mingus/extra/tunings.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,12 @@ def get_instruments():
add_tuning(
"Baritone guitar",
"Standard 5th lower tuning",
["A-1", "D-2", "G-2", "C-3", "E-3", "A-3",],
["A-1", "D-2", "G-2", "C-3", "E-3", "A-3"],
)
add_tuning(
"Baritone guitar",
"Octave lower tuning",
["E-1", "A-1", "D-2", "G-2", "B-2", "E-3",],
["E-1", "A-1", "D-2", "G-2", "B-2", "E-3"],
)
add_tuning("Bass guitar", "Standard 4-string tuning", ["E-1", "A-1", "D-2", "G-2"])
add_tuning(
Expand All @@ -560,7 +560,7 @@ def get_instruments():
add_tuning(
"Bass guitar",
"Standard 6-string tuning",
["B-0", "E-1", "A-1", "D-2", "G-2", "C-3",],
["B-0", "E-1", "A-1", "D-2", "G-2", "C-3"],
)
add_tuning("Cello", "Standard tuning", ["C-2", "G-2", "D-3", "A-3"])
add_tuning("Cello", '"5th Suite" tuning', ["C-2", "G-2", "D-3", "G-3"])
Expand Down Expand Up @@ -619,17 +619,17 @@ def get_instruments():
"Standard F6 tuning",
[["D-3", "D-4"], ["A-3", "A-3"], ["D-4", "D-4"]],
)
add_tuning("Guitar", "Standard tuning", ["E-2", "A-2", "D-3", "G-3", "B-3", "E-4",])
add_tuning("Guitar", "Standard tuning", ["E-2", "A-2", "D-3", "G-3", "B-3", "E-4"])
add_tuning(
"Guitar", "*DADGAD* Dsus4 tuning", ["D-2", "A-2", "D-3", "G-3", "A-3", "D-4",]
"Guitar", "*DADGAD* Dsus4 tuning", ["D-2", "A-2", "D-3", "G-3", "A-3", "D-4"]
)
add_tuning(
"Guitar", "Double drop D tuning", ["D-2", "A-2", "D-3", "G-3", "B-3", "D-4",]
"Guitar", "Double drop D tuning", ["D-2", "A-2", "D-3", "G-3", "B-3", "D-4"]
)
add_tuning("Guitar", "Drop D tuning", ["D-2", "A-2", "D-3", "G-3", "B-3", "E-4",])
add_tuning("Guitar", "Open C major tuning", ["C-2", "G-2", "C-3", "G-3", "C-3", "E-4",])
add_tuning("Guitar", "Open E minor tuning", ["E-2", "B-2", "E-3", "G-3", "B-3", "E-4",])
add_tuning("Guitar", "Open G major tuning", ["D-2", "G-2", "D-3", "G-3", "B-3", "D-4",])
add_tuning("Guitar", "Drop D tuning", ["D-2", "A-2", "D-3", "G-3", "B-3", "E-4"])
add_tuning("Guitar", "Open C major tuning", ["C-2", "G-2", "C-3", "G-3", "C-3", "E-4"])
add_tuning("Guitar", "Open E minor tuning", ["E-2", "B-2", "E-3", "G-3", "B-3", "E-4"])
add_tuning("Guitar", "Open G major tuning", ["D-2", "G-2", "D-3", "G-3", "B-3", "D-4"])
add_tuning(
"Guitar",
"Standard tuning. Some players tune the second course G string to unison to minimize breakage.",
Expand All @@ -645,9 +645,9 @@ def get_instruments():
add_tuning(
"Guitar Banjo",
"Standard guitar tuning",
["E-2", "A-2", "D-3", "G-3", "B-3", "E-4",],
["E-2", "A-2", "D-3", "G-3", "B-3", "E-4"],
)
add_tuning("Guitarrón", "Standard tuning", ["A-1", "D-2", "G-2", "C-3", "E-3", "A-2",])
add_tuning("Guitarrón", "Standard tuning", ["A-1", "D-2", "G-2", "C-3", "E-3", "A-2"])
add_tuning(
"Huapanguera", "", ["G-2", ["D-3", "D-4"], ["G-3", "G-3"], ["B-3", "B-3"], "E-3"]
)
Expand Down Expand Up @@ -710,16 +710,16 @@ def get_instruments():
add_tuning("Mejorana", "Standard tuning", ["D-4", "A-4", "A-3", "B-3", "E-4"])
add_tuning("Mejorana", "Alternative tuning", ["D-4", "G-4", "G-3", "B-3", "E-3"])
add_tuning(
"Octave Guitar", "see *Soprano guitar*", ["E-3", "A-4", "D-4", "G-4", "B-4", "E-5",]
"Octave Guitar", "see *Soprano guitar*", ["E-3", "A-4", "D-4", "G-4", "B-4", "E-5"]
)
add_tuning("Requinto", "Standard tuning", ["A-2", "D-3", "G-3", "C-4", "E-4", "A-4",])
add_tuning("Requinto", "Standard tuning", ["A-2", "D-3", "G-3", "C-4", "E-4", "A-4"])
add_tuning(
"Ronroco",
"Standard C6 tuning (tuned an octave below the charango).",
[["G-3", "G-3"], ["C-3", "C-3"], ["E-4", "E-3"], ["A-3", "A-3"], ["E-4", "E-4"]],
)
add_tuning(
"Soprano guitar", "Standard tuning", ["E-3", "A-4", "D-4", "G-4", "B-4", "E-5",]
"Soprano guitar", "Standard tuning", ["E-3", "A-4", "D-4", "G-4", "B-4", "E-5"]
)
add_tuning(
"Taro patch",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
],
),
],
install_requires=["six",],
install_requires=["six"],
extras_require={
"fft": ["numpy"],
"fluidsynth": ["numpy"],
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/containers/test_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ def test_can_play_notes(self):
self.assertEqual(False, self.g.can_play_notes(self.noteshigh))
self.assertEqual(
False,
self.g.can_play_notes(NoteContainer(["A", "B", "C", "D", "E", "F", "G",])),
self.g.can_play_notes(NoteContainer(["A", "B", "C", "D", "E", "F", "G"])),
)
2 changes: 1 addition & 1 deletion tests/unit/containers/test_note_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def setUp(self):
self.n2 = NoteContainer("A")
self.n3 = NoteContainer(["A", "C", "E"])
self.n4 = NoteContainer(["A", "C", "E", "F", "G"])
self.n5 = NoteContainer(["A", "C", "E", "F", "G", "A",])
self.n5 = NoteContainer(["A", "C", "E", "F", "G", "A"])
self.n6 = NoteContainer(["A", "E", "C-5"])

def test_equality(self):
Expand Down
26 changes: 13 additions & 13 deletions tests/unit/core/test_chords.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ def test_from_shorthand(self):
"A7#11": ["A", "C#", "E", "G", "D#"],
"Am11": ["A", "C", "E", "G", "D"],
"Amin11": ["A", "C", "E", "G", "D"],
"Amaj13": ["A", "C#", "E", "G#", "B", "F#",],
"A13": ["A", "C#", "E", "G", "B", "F#",],
"Am13": ["A", "C", "E", "G", "B", "F#",],
"Amaj13": ["A", "C#", "E", "G#", "B", "F#"],
"A13": ["A", "C#", "E", "G", "B", "F#"],
"Am13": ["A", "C", "E", "G", "B", "F#"],
"A7b9": ["A", "C#", "E", "G", "Bb"],
"A7#9": ["A", "C#", "E", "G", "B#"],
"A7b5": ["A", "C#", "Eb", "G"],
Expand All @@ -389,8 +389,8 @@ def test_from_shorthand(self):
"N.C.": [],
"NC": [],
"Dm|G": ["G", "B", "D", "F", "A"],
"Dm7|G": ["G", "B", "D", "F", "A", "C",],
"Am7|G7": ["G", "B", "D", "F", "A", "C", "E", "G",],
"Dm7|G": ["G", "B", "D", "F", "A", "C"],
"Am7|G7": ["G", "B", "D", "F", "A", "C", "E", "G"],
}
for x in answers:
self.assertEqual(
Expand Down Expand Up @@ -425,9 +425,9 @@ def test_determine(self):
)
self.chordsTest(
[
[["A13"], ["A", "C#", "E", "G", "B", "D", "F#",]],
[["Am13"], ["A", "C", "E", "G", "B", "D", "F#",]],
[["AM13"], ["A", "C#", "E", "G#", "B", "D", "F#",]],
[["A13"], ["A", "C#", "E", "G", "B", "D", "F#"]],
[["Am13"], ["A", "C", "E", "G", "B", "D", "F#"]],
[["AM13"], ["A", "C#", "E", "G#", "B", "D", "F#"]],
],
lambda x: chords.determine(x, True),
"chord name",
Expand All @@ -438,11 +438,11 @@ def test_determine_polychord(self):
[ # insano test
[["FM|Dm"], ["D", "F", "A", "C"]],
[["Dm|GM"], ["G", "B", "D", "F", "A"]],
[["FM|G7", "FM|GM"], ["G", "B", "D", "F", "A", "C",]],
[["Am|G7"], ["G", "B", "D", "F", "A", "C", "E",]],
[["Am7|G7"], ["G", "B", "D", "F", "A", "C", "E", "G",]],
[["CM9|CM"], ["C", "E", "G", "C", "E", "G", "B", "D",]],
[["CM9|CM7"], ["C", "E", "G", "B", "C", "E", "G", "B", "D",]],
[["FM|G7", "FM|GM"], ["G", "B", "D", "F", "A", "C"]],
[["Am|G7"], ["G", "B", "D", "F", "A", "C", "E"]],
[["Am7|G7"], ["G", "B", "D", "F", "A", "C", "E", "G"]],
[["CM9|CM"], ["C", "E", "G", "C", "E", "G", "B", "D"]],
[["CM9|CM7"], ["C", "E", "G", "B", "C", "E", "G", "B", "D"]],
[
["A13|G13"],
[
Expand Down
16 changes: 8 additions & 8 deletions tests/unit/extra/test_tunings.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,28 @@ def test_count_courses(self):

def test_find_frets(self):
self.assertTrue(
self.guitar6.find_frets("E-1") == [None, None, None, None, None, None,]
self.guitar6.find_frets("E-1") == [None, None, None, None, None, None]
)
self.assertTrue(
self.guitar6.find_frets("E-2") == [0, None, None, None, None, None,]
self.guitar6.find_frets("E-2") == [0, None, None, None, None, None]
)
self.assertTrue(
self.guitar6.find_frets("A-2") == [5, 0, None, None, None, None,]
self.guitar6.find_frets("A-2") == [5, 0, None, None, None, None]
)
self.assertTrue(
self.guitar6.find_frets("D-3") == [10, 5, 0, None, None, None,]
self.guitar6.find_frets("D-3") == [10, 5, 0, None, None, None]
)
self.assertTrue(
self.guitar6.find_frets("G-3") == [15, 10, 5, 0, None, None,]
self.guitar6.find_frets("G-3") == [15, 10, 5, 0, None, None]
)
self.assertTrue(
self.guitar6.find_frets("B-3") == [19, 14, 9, 4, 0, None,]
self.guitar6.find_frets("B-3") == [19, 14, 9, 4, 0, None]
)
self.assertTrue(
self.guitar6.find_frets("E-4") == [24, 19, 14, 9, 5, 0,]
self.guitar6.find_frets("E-4") == [24, 19, 14, 9, 5, 0]
)
self.assertTrue(
self.guitar6.find_frets("E-4", 18) == [None, None, 14, 9, 5, 0,]
self.guitar6.find_frets("E-4", 18) == [None, None, 14, 9, 5, 0]
)

def test_find_fingering(self):
Expand Down

0 comments on commit 2217897

Please sign in to comment.