Open Codeguyross opened 5 years ago
From matlab elseif statements are being incorrectly converted to python
In matlab:
elseif checkVal(e) < 50 && ... checkVal2(e) == something
Is being convered to this in python
else: if checkVal(e) < - 50 and checkVal2(e) == something:
This might look ok but if you have more than one elseif in matlab then the output in python is nesting the elseif statements.
an example of the bad translation to python is
else: if checkVal(e) < - 50 and checkVal2(e) == something: else: if checkVal(e) < - 50 and checkVal2(e) == something:
to correctly convert this line to python it needs to be converted to
elif checkVal(e) < - 50 and checkVal2(e) == something:
Sourcery is capable of resolving this sort of issue after the fact. https://sourcery.ai In particular see https://sourcery.ai/blog/explaining-refactorings-3/
From matlab elseif statements are being incorrectly converted to python
In matlab:
Is being convered to this in python
This might look ok but if you have more than one elseif in matlab then the output in python is nesting the elseif statements.
an example of the bad translation to python is
to correctly convert this line to python it needs to be converted to
elif checkVal(e) < - 50 and checkVal2(e) == something: