MCPcopy
hub / github.com/mitmproxy/mitmproxy / filter

Method filter

mitmproxy/log.py:75–83  ·  view source on GitHub ↗
(self, record: logging.LogRecord)

Source from the content-addressed store, hash-verified

73 self._initiated_in_test = os.environ.get("PYTEST_CURRENT_TEST")
74
75 def filter(self, record: logging.LogRecord) -> bool:
76 # We can't remove stale handlers here because that would modify .handlers during iteration!
77 return bool(
78 super().filter(record)
79 and (
80 not self._initiated_in_test
81 or self._initiated_in_test == os.environ.get("PYTEST_CURRENT_TEST")
82 )
83 )
84
85 def install(self) -> None:
86 if self._initiated_in_test:

Callers 15

requestFunction · 0.45
elasticlunr.min.jsFile · 0.45
requestMethod · 0.45
responseMethod · 0.45
updateUrlFromStoreFunction · 0.45
tabsForFlowFunction · 0.45
FlowRow.tsxFile · 0.45
FlowTableHead.tsxFile · 0.45
handleChangeFunction · 0.45
LocalDropdownFunction · 0.45
handleDeletionProcessFunction · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected