okami.mom/albedo
git clone https://git.nkp.pet/okami.mom/albedo
77f1bc8
main
1"""Keep the shipped kernel parseable on the version in pyrightconfig.json. 2 3E2E uses the local interpreter, so Python 3.14 can hide syntax that breaks 4remote boot on older hosts. Check every module, including disabled plugins. 5""" 6 7import ast 8import json 9import unittest 10from pathlib import Path 11 12ROOT = Path (__file__ ).resolve ().parents [2 ] 13 14 15class PythonCompatibilityTest (unittest .TestCase ): 16def test_bundle_parses_on_supported_python (self ): 17config = json .loads ((ROOT / "pyrightconfig.json" ).read_text ()) 18major ,minor = config ["pythonVersion" ].split ("." ) 19version = (int (major ),int (minor )) 20for path in sorted ((ROOT / "priv" / "python" ).rglob ("*.py" )): 21with self .subTest (path = str (path .relative_to (ROOT ))): 22ast .parse (path .read_text (),filename = str (path ),feature_version = version ) 23 24 25if __name__ == "__main__" : 26unittest .main ()