(filename_or_obj)
| 92 | |
| 93 | |
| 94 | def _get_mtime(filename_or_obj): |
| 95 | # if passed an actual file path, augment the token with |
| 96 | # the file modification time |
| 97 | mtime = None |
| 98 | |
| 99 | try: |
| 100 | path = os.fspath(filename_or_obj) |
| 101 | except TypeError: |
| 102 | path = None |
| 103 | |
| 104 | if path and not is_remote_uri(path): |
| 105 | mtime = os.path.getmtime(os.path.expanduser(filename_or_obj)) |
| 106 | |
| 107 | return mtime |
| 108 | |
| 109 | |
| 110 | def _protect_dataset_variables_inplace(dataset: Dataset, cache: bool) -> None: |
no test coverage detected
searching dependent graphs…