MCPcopy Index your code
hub / github.com/python/cpython / is_os_mismatch

Function is_os_mismatch

Tools/c-analyzer/c_parser/preprocessor/common.py:142–153  ·  view source on GitHub ↗
(filename, errtext=None)

Source from the content-addressed store, hash-verified

140
141
142def is_os_mismatch(filename, errtext=None):
143 # See: https://docs.python.org/3/library/sys.html#sys.platform
144 actual = sys.platform
145 if actual == 'unknown':
146 raise NotImplementedError
147
148 if errtext is not None:
149 if (missing := is_missing_dep(errtext)):
150 matching = get_matching_oses(missing, filename)
151 if actual not in matching:
152 return matching
153 return False
154
155
156def get_matching_oses(missing, filename):

Callers 2

preprocessFunction · 0.85
convert_errorFunction · 0.85

Calls 2

is_missing_depFunction · 0.85
get_matching_osesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…