Open Nour-Mws opened 1 year ago
We should include a rule (enforced or suggested) that if you are running FD on code written in Python version X, FD must be run on version X or later. We should include a message similar to: "this error may happen because of the Python versions mismatch".
AST currently attempts to parse code from a Python file, and on failing, logs an error message and abandons that file (but continues parsing other files, depending on the CLI input). While this is the desired behavior, the user is only provided with an error message and no hints to debug or understand what caused the error beyond the file path and line.
An example is the following where the
match
expression (introduced in Python 3.10) is not recognized by FawltyDeps' AST run in 3.9.Error message:
It would be helpful to tell the user that the Python syntax might be invalid or not recognized by FawltyDeps because of a mismatch in the Python version.