MCPcopy Index your code
hub / github.com/RustPython/RustPython / _calc_mode

Function _calc_mode

Lib/importlib/_bootstrap_external.py:381–390  ·  view source on GitHub ↗

Calculate the mode permissions for a bytecode file.

(path)

Source from the content-addressed store, hash-verified

379
380
381def _calc_mode(path):
382 """Calculate the mode permissions for a bytecode file."""
383 try:
384 mode = _path_stat(path).st_mode
385 except OSError:
386 mode = 0o666
387 # We always ensure write access so we can update cached files
388 # later even when the source files are read-only on Windows (#6074)
389 mode |= 0o200
390 return mode
391
392
393def _check_name(method):

Callers 1

_cache_bytecodeMethod · 0.70

Calls 1

_path_statFunction · 0.70

Tested by

no test coverage detected