MCPcopy Index your code
hub / github.com/rocky/python-uncompyle6 / syntax_check

Function syntax_check

uncompyle6/main.py:59–67  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

57
58
59def syntax_check(filename: str) -> bool:
60 with open(filename) as f:
61 source = f.read()
62 valid = True
63 try:
64 ast.parse(source)
65 except SyntaxError:
66 valid = False
67 return valid
68
69
70def decompile(

Callers 1

mainFunction · 0.85

Calls 2

openFunction · 0.85
readMethod · 0.80

Tested by

no test coverage detected