MCPcopy Index your code
hub / github.com/python/mypy / getmtime

Method getmtime

mypy/build.py:1178–1187  ·  view source on GitHub ↗

Return a file's mtime; but 0 in bazel mode. (Bazel's distributed cache doesn't like filesystem metadata to end up in output files.)

(self, path: str)

Source from the content-addressed store, hash-verified

1176 return self.fscache.stat_or_none(self.maybe_swap_for_shadow_path(path))
1177
1178 def getmtime(self, path: str) -> int:
1179 """Return a file's mtime; but 0 in bazel mode.
1180
1181 (Bazel's distributed cache doesn't like filesystem metadata to
1182 end up in output files.)
1183 """
1184 if self.options.bazel:
1185 return 0
1186 else:
1187 return int(self.metastore.getmtime(path))
1188
1189 def correct_rel_imp(self, file: MypyFile, imp: ImportFrom | ImportAll) -> str:
1190 """Function to correct for relative imports."""

Callers 4

write_deps_cacheFunction · 0.45
read_deps_cacheFunction · 0.45
validate_metaFunction · 0.45
write_cacheFunction · 0.45

Calls 1

intClass · 0.85

Tested by

no test coverage detected