MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / _fmt_watch_issue

Function _fmt_watch_issue

src/pyspector/cli.py:354–364  ·  view source on GitHub ↗

Format one issue as a compact single-line string for watch-mode diffs.

(issue, tag: str, tag_color: str)

Source from the content-addressed store, hash-verified

352 severity_map = {"LOW": 0, "MEDIUM": 1, "HIGH": 2, "CRITICAL": 3}
353 min_sev = severity_map[severity_level.upper()]
354
355 return [
356 issue for issue in raw_issues
357 if severity_map[str(issue.severity).split(".")[-1].upper()] >= min_sev
358 and issue.get_fingerprint() not in ignored_fingerprints
359 ]
360
361
362def _fmt_watch_issue(issue, tag: str, tag_color: str) -> str:
363 """Format one issue as a compact single-line string for watch-mode diffs."""
364 sev = str(issue.severity).split(".")[-1].upper()
365 return (
366 click.style(f" {tag:<10}", fg=tag_color, bold=True)
367 + " "

Callers 1

_do_rescanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected