Skip to content

Commit

Permalink
v5.5 -- fix lint errors, ready to release
Browse files Browse the repository at this point in the history
  • Loading branch information
mscuthbert committed Oct 29, 2018
1 parent 1e6f9f3 commit 4d258e0
Show file tree
Hide file tree
Showing 10 changed files with 270 additions and 272 deletions.
48 changes: 26 additions & 22 deletions documentation/source/about/what.ipynb

Large diffs are not rendered by default.

87 changes: 43 additions & 44 deletions documentation/source/usersGuide/usersGuide_06_stream2.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

208 changes: 104 additions & 104 deletions documentation/source/usersGuide/usersGuide_12_music21object.ipynb

Large diffs are not rendered by default.

62 changes: 27 additions & 35 deletions documentation/source/usersGuide/usersGuide_15_key.ipynb

Large diffs are not rendered by default.

79 changes: 44 additions & 35 deletions documentation/source/usersGuide/usersGuide_22_graphing.ipynb

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions music21/abcFormat/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,11 +891,11 @@ def testAbcKeyImport(self):
major = ['C', 'G', 'D', 'A', 'E', 'B', 'F#', 'C#']
minor = ['Am', 'Em', 'Bm', 'F#m', 'C#m', 'G#m', 'D#m', 'A#m']

for n, (maj,min) in enumerate(zip(major, minor)):
am = abcFormat.ABCMetadata('K:'+maj)
for n, (majName, minName) in enumerate(zip(major, minor)):
am = abcFormat.ABCMetadata('K:' + majName)
am.preParse()
ks_major = am.getKeySignatureObject()
am = abcFormat.ABCMetadata('K:'+min)
am = abcFormat.ABCMetadata('K:' + minName)
am.preParse()
ks_minor = am.getKeySignatureObject()
self.assertEqual(n, ks_major.sharps)
Expand All @@ -907,15 +907,15 @@ def testAbcKeyImport(self):
major = ['C', 'F', 'Bb', 'Eb', 'Ab', 'Db', 'Gb', 'Cb']
minor = ['Am', 'Dm', 'Gm', 'Cm', 'Fm', 'Bbm', 'Ebm', 'Abm']

for n, (maj,min) in enumerate(zip(major, minor)):
am = abcFormat.ABCMetadata('K:'+maj)
for n, (majName, minName) in enumerate(zip(major, minor)):
am = abcFormat.ABCMetadata('K:' + majName)
am.preParse()
ks_major = am.getKeySignatureObject()
am = abcFormat.ABCMetadata('K:'+min)
am = abcFormat.ABCMetadata('K:' + minName)
am.preParse()
ks_minor = am.getKeySignatureObject()
self.assertEqual(-n, ks_major.sharps)
self.assertEqual(-n, ks_minor.sharps)
self.assertEqual(-1 * n, ks_major.sharps)
self.assertEqual(-1 * n, ks_minor.sharps)
self.assertEqual('major', ks_major.mode)
self.assertEqual('minor', ks_minor.mode)

Expand Down
8 changes: 4 additions & 4 deletions music21/figuredBass/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,15 @@ def voiceCrossing(possibA):
'''
partViolations = []
for part1Index in range(len(possibA)):
try:
try: # noqa
higherPitch = possibA[part1Index]
higherPitch.ps # pylint: disable=pointless-statement # noqa
higherPitch.ps # pylint: disable=pointless-statement
except AttributeError:
continue
for part2Index in range(part1Index + 1, len(possibA)):
try:
try: # noqa
lowerPitch = possibA[part2Index]
lowerPitch.ps # pylint: disable=pointless-statement # noqa
lowerPitch.ps # pylint: disable=pointless-statement
except AttributeError:
continue
if higherPitch < lowerPitch:
Expand Down
3 changes: 1 addition & 2 deletions music21/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import abc
import copy
import enum
import math
import unittest

Expand All @@ -34,8 +35,6 @@
_MOD = 'interval'
environLocal = environment.Environment(_MOD)

import enum

#-------------------------------------------------------------------------------
# constants

Expand Down
5 changes: 3 additions & 2 deletions music21/test/testStream.py
Original file line number Diff line number Diff line change
Expand Up @@ -4437,7 +4437,7 @@ def testElementsHighestTimeA(self):
self.assertEqual(s.index(b1), 1)

def testStoreAtEndFailures(self):
from music21 import stream, bar
from music21 import stream

s = Stream()
with self.assertRaises(stream.StreamException):
Expand Down Expand Up @@ -5140,7 +5140,8 @@ def testActiveSiteMangling(self):
self.assertEqual(inner.activeSite, outer)
junk = inner.semiFlat
self.assertEqual(inner.activeSite, outer)
junk = inner.flat # the order of these two calls ensures that _getFlatFromSemiflat is called
junk = inner.flat
# the order of these two calls ensures that _getFlatFromSemiflat is called
self.assertEqual(inner.activeSite, outer)

# this works fine
Expand Down

0 comments on commit 4d258e0

Please sign in to comment.