Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if len(notes) == 1:
for i in scale.getChords():
if i._types[0]._type == notes[0]._type:
chord = i
break
pianoprinter.octoPrint(chord._types)
while True:
print(str(chord)+", accept? Yy Nn")
inp2 = usrinp()
if inp2 in "Yy":
return chord
elif inp2 in "Nn":
break
elif len(notes) == 3:
chord = musictheory.chord3(notes[0], notes[1], notes[2])
pianoprinter.octoPrint(chord._types)
while True:
print(str(chord)+", accept? Yy Nn")
inp2 = usrinp()
if inp2 in "Yy":
return chord
elif inp2 in "Nn":
break