Reformat evaluator #1
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
from smnp.error.syntax import SyntaxException
|
||||
|
||||
|
||||
class NotePitch(Enum):
|
||||
C = 0
|
||||
CIS = 1
|
||||
@@ -46,7 +48,7 @@ class NotePitch(Enum):
|
||||
try:
|
||||
return stringToPitch[string.lower()]
|
||||
except KeyError as e:
|
||||
raise SyntaxException(None, f"Note '{string}' does not exist")
|
||||
raise SyntaxException(f"Note '{string}' does not exist") #TODO jakis inny exception
|
||||
|
||||
stringToPitch = {
|
||||
'c': NotePitch.C,
|
||||
|
||||
Reference in New Issue
Block a user