fix(scan): Prüfwerk's own code no longer flags its test literals (#908)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 8s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 5m37s
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 8s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 5m37s
This commit was merged in pull request #908.
This commit is contained in:
1 parent
aa1c9b5d2b
commit
4480e8b509
3 files changed
+21
-5
No files matched your search
@@ -53,16 +53,17 @@ class FakeProjects:
|
||||
|
||||
def run(argv: list[str], projects: FakeProjects | None) -> int:
|
||||
"""Run the script with `argv`; its exit status (0 when it returns)."""
|
||||
source = SCRIPT.read_text(encoding="utf-8")
|
||||
scope: dict[str, object] = {"__name__": "__main__", "__file__": str(SCRIPT)}
|
||||
# The Script Engine's globals; runpy adds __name__ and __file__.
|
||||
scope: dict[str, object] = {}
|
||||
if projects is not None:
|
||||
scope["projects"] = projects
|
||||
import runpy
|
||||
import sys
|
||||
|
||||
saved = sys.argv
|
||||
sys.argv = argv
|
||||
try:
|
||||
exec(compile(source, str(SCRIPT), "exec"), scope)
|
||||
runpy.run_path(str(SCRIPT), init_globals=scope, run_name="__main__")
|
||||
except SystemExit as stop:
|
||||
return int(stop.code or 0)
|
||||
finally:
|
||||
|
||||
Reference in new issue
Block a user