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

Function _calc_mode

Lib/importlib/_bootstrap_external.py:370–379  ·  view source on GitHub ↗

Calculate the mode permissions for a bytecode file.

(path)

Source from the content-addressed store, hash-verified

368
369
370def _calc_mode(path):
371 """Calculate the mode permissions for a bytecode file."""
372 try:
373 mode = _path_stat(path).st_mode
374 except OSError:
375 mode = 0o666
376 # We always ensure write access so we can update cached files
377 # later even when the source files are read-only on Windows (#6074)
378 mode |= 0o200
379 return mode
380
381
382def _check_name(method):

Callers 1

_cache_bytecodeMethod · 0.85

Calls 1

_path_statFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…