MCPcopy Create free account
hub / github.com/IDEA-Research/DINO / _validate_py_syntax

Method _validate_py_syntax

util/slconfig.py:71–78  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

69 """
70 @staticmethod
71 def _validate_py_syntax(filename):
72 with open(filename) as f:
73 content = f.read()
74 try:
75 ast.parse(content)
76 except SyntaxError:
77 raise SyntaxError('There are syntax errors in config '
78 f'file {filename}')
79
80 @staticmethod
81 def _file2dict(filename):

Callers 1

_file2dictMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected