MCPcopy
hub / github.com/mitmproxy/mitmproxy / version

Function version

release/build.py:84–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82
83
84def version() -> str:
85 if ref := os.environ.get("GITHUB_REF", ""):
86 if ref.startswith("refs/tags/") and not ref.startswith("refs/tags/v"):
87 raise AssertionError(f"Unexpected tag: {ref}")
88 return (
89 ref.removeprefix("refs/heads/")
90 .removeprefix("refs/pull/")
91 .removeprefix("refs/tags/v")
92 .replace("/", "-")
93 )
94 else:
95 return os.environ.get("BUILD_VERSION", "dev")
96
97
98def operating_system() -> str:

Callers 5

wheelFunction · 0.70
standalone_binariesFunction · 0.70
macos_appFunction · 0.70
msix_installerFunction · 0.70
installbuilder_installerFunction · 0.70

Calls 2

getMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…