Cleanup: various spelling corrections in comments & strings

This commit is contained in:
Campbell Barton 2026-01-28 14:59:34 +11:00
parent 3cfdf547ae
commit f2871ca16b
19 changed files with 29 additions and 29 deletions

View file

@ -67,7 +67,7 @@ def mutex_lock_and_open(file_path: Path, mode: str) -> tuple[io.IOBase | None, C
:param: mode MUST be a binary mode, to be compatible with the file locking
on Windows. So either 'rb' or 'wb'.
:returns: If the file was opened & locked succesfully, a tuple (file,
:returns: If the file was opened & locked successfully, a tuple (file,
unlocker) is returned. Otherwise returns None. The caller should call
`unlocker(file)` to unlock the mutex.
"""
@ -101,7 +101,7 @@ def mutex_lock_and_open(file_path: Path, mode: str) -> tuple[io.IOBase | None, C
# It is not suitable here to use an 'exclusive create' ('x' option) here.
# That will still create a race condition, with the space between creation
# of the file and locking it. So, better to make the existence of the file
# meaningless, and only communicate the lock state with an actual filesystem
# meaningless, and only communicate the lock state with an actual file-system
# lock.
try:
# Type is ignored here, because the type checker doesn't realize that

View file

@ -1201,7 +1201,7 @@ class MetadataProviderFilesystem(MetadataProvider):
dir = meta_path.parent
dir.mkdir(mode=0o700, parents=True, exist_ok=True)
# See load() for an explanation of the numer of tries & wait time.
# See load() for an explanation of the number of tries & wait time.
meta_file, unlocker = locking.mutex_lock_and_open_with_retry(
meta_path, 'wb', max_tries=20, wait_time_sec=0.1)