Build a checker with an injected (fake) FastLED.h and a FileContent.
(
code: str,
path: str = _FL_PATH,
fastled_h: str = "",
)
| 39 | |
| 40 | |
| 41 | def _make( |
| 42 | code: str, |
| 43 | path: str = _FL_PATH, |
| 44 | fastled_h: str = "", |
| 45 | ) -> tuple[PublicSettingsPatternChecker, FileContent]: |
| 46 | """Build a checker with an injected (fake) FastLED.h and a FileContent.""" |
| 47 | checker = PublicSettingsPatternChecker.__new__(PublicSettingsPatternChecker) |
| 48 | checker.violations = {} |
| 49 | checker._fastled_h_content = fastled_h |
| 50 | lines = code.splitlines() |
| 51 | fc = FileContent(path=path, content=code, lines=lines) |
| 52 | return checker, fc |
| 53 | |
| 54 | |
| 55 | def _violations( |
no test coverage detected