Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use identity check for comparison to a singleton #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions keiis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def practice(args):

bad_file = True

while bad_file == True:
while bad_file is True:

input_file = input("- Enter the filepath to your sheet music/audio/video/midi file [formats supported: mid/midi/pdf/png/jpeg/common audio or video formats]\n- Or enter [e] to exit.\nEnter: ")
if input_file == "e" or input_file == "E":
Expand Down Expand Up @@ -81,7 +81,7 @@ def practice(args):

mimestart = mimetypes.guess_type(file_base_name)[0]

if mimestart != None:
if mimestart is not None:
mimestart = mimestart.split('/')[0]

# if file format is invaild
Expand Down Expand Up @@ -140,7 +140,7 @@ def practice(args):
file_type = os.path.splitext(file_base_name)[1]

bad_file2 = True
while bad_file2 == True:
while bad_file2 is True:
print("Audio/video file {} uploaded.".format(file_base_name))
bad_file2 = False

Expand Down Expand Up @@ -249,15 +249,15 @@ def main():
elif args.midi2sheet != None:
midi2sheet(args)
'''
if args.sheet2midi != None:
if args.sheet2midi is not None:
sheet2midi(args)
elif args.audio2midi != None:
elif args.audio2midi is not None:
audio2midi(args)
elif args.midi_comparison != None:
elif args.midi_comparison is not None:
midi_comparison(args)
elif args.practice != None:
elif args.practice is not None:
practice(args)
elif args.midi2pianoroll != None:
elif args.midi2pianoroll is not None:
midi2pianoroll(args)

if __name__ == "__main__":
Expand Down