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

Function load_baseline

ci/tools/check_noexcept.py:116–126  ·  view source on GitHub ↗

Load the checked-in baseline as a counted set of signature keys.

(path: Path = DEFAULT_BASELINE)

Source from the content-addressed store, hash-verified

114
115
116def load_baseline(path: Path = DEFAULT_BASELINE) -> Counter[str]:
117 """Load the checked-in baseline as a counted set of signature keys."""
118 baseline: Counter[str] = Counter()
119 if not path.exists():
120 return baseline
121 for raw_line in path.read_text(encoding="utf-8").splitlines():
122 line = raw_line.strip()
123 if not line or line.startswith("#"):
124 continue
125 baseline[line] += 1
126 return baseline
127
128
129def write_baseline(hits: list[NoexceptHit], path: Path = DEFAULT_BASELINE) -> None:

Callers 2

run_noexcept_ast_checkFunction · 0.90
mainFunction · 0.85

Calls 1

CounterClass · 0.85

Tested by

no test coverage detected