MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / is_python

Function is_python

_pydev_bundle/pydev_monkey.py:277–287  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

275# Things related to monkey-patching
276# ===============================================================================
277def is_python(path):
278 single_quote, double_quote = _get_str_type_compatible(path, ["'", '"'])
279
280 if path.endswith(single_quote) or path.endswith(double_quote):
281 path = path[1 : len(path) - 1]
282 filename = os.path.basename(path).lower()
283 for name in _get_str_type_compatible(filename, ["python", "jython", "pypy"]):
284 if filename.find(name) != -1:
285 return True
286
287 return False
288
289
290class InvalidTypeInArgsException(Exception):

Callers 3

patch_argsFunction · 0.85
patch_arg_str_winFunction · 0.85
new_forkFunction · 0.85

Calls 2

_get_str_type_compatibleFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected