MCPcopy Create free account
hub / github.com/FastLED/FastLED / check_file

Function check_file

ci/lint_python/keyboard_interrupt_checker.py:238–246  ·  view source on GitHub ↗

Parse *source* and return all KBI violations found.

(path: str, source: str)

Source from the content-addressed store, hash-verified

236
237
238def check_file(path: str, source: str) -> list[Violation]:
239 """Parse *source* and return all KBI violations found."""
240 try:
241 tree = ast.parse(source, filename=path)
242 except SyntaxError:
243 return []
244 visitor = TryExceptVisitor(source_lines=source.splitlines())
245 visitor.visit(tree)
246 return visitor.violations
247
248
249def collect_python_files(

Callers 5

_violationsMethod · 0.90
_violationsMethod · 0.90
_violationsMethod · 0.90
_violationsMethod · 0.90
mainFunction · 0.70

Calls 3

TryExceptVisitorClass · 0.85
parseMethod · 0.45
visitMethod · 0.45

Tested by 4

_violationsMethod · 0.72
_violationsMethod · 0.72
_violationsMethod · 0.72
_violationsMethod · 0.72