MCPcopy Create free account
hub / github.com/ezyang/ghstack / redact

Method redact

src/ghstack/logs.py:52–57  ·  view source on GitHub ↗
(self, needle: str, replace: str = "<REDACTED>")

Source from the content-addressed store, hash-verified

50 # retroactively redact stuff you've already leaked, so make sure
51 # you redact things as soon as possible
52 def redact(self, needle: str, replace: str = "<REDACTED>") -> None:
53 # Don't redact empty strings; this will lead to something
54 # that looks like s<REDACTED>t<REDACTED>r<REDACTED>...
55 if needle == "":
56 return
57 self.redactions[needle] = replace
58
59
60formatter = Formatter(fmt="%(levelname)s: %(message)s", datefmt="")

Callers 1

read_configFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected