MissionPlanner icon indicating copy to clipboard operation
MissionPlanner copied to clipboard

Scripts: Modernize Python 2 code to get ready for Python 3

Open cclauss opened this issue 5 months ago • 2 comments

print() is a function in Python 3.

% ruff check Scripts | grep SyntaxError % uvx --python=3.12 --from=future futurize --stage1 --write <files with SyntaxErrors>

https://docs.astral.sh/ruff https://github.com/PythonCharmers/python-future

cclauss avatar Jul 27 '25 14:07 cclauss

Do note that Mission Planner uses IronPython rather than CPython. Python 3 is still a very new thing for that AFAIK.

tpwrules avatar Jul 28 '25 23:07 tpwrules

These are “safe” changes that should not break Py2 compatibility but of course that requires testing.

cclauss avatar Jul 29 '25 00:07 cclauss