--- a/mercurial/posix.py Fri Dec 16 14:24:02 2022 -0500
+++ b/mercurial/posix.py Fri Dec 16 18:14:54 2022 -0500
@@ -20,6 +20,7 @@
import unicodedata
from typing import (
+ Any,
Iterable,
Iterator,
List,
@@ -672,15 +673,15 @@
class cachestat:
- def __init__(self, path):
+ def __init__(self, path: bytes) -> None:
self.stat = os.stat(path)
- def cacheable(self):
+ def cacheable(self) -> bool:
return bool(self.stat.st_ino)
__hash__ = object.__hash__
- def __eq__(self, other):
+ def __eq__(self, other: Any) -> bool:
try:
# Only dev, ino, size, mtime and atime are likely to change. Out
# of these, we shouldn't compare atime but should compare the
@@ -701,7 +702,7 @@
except AttributeError:
return False
- def __ne__(self, other):
+ def __ne__(self, other: Any) -> bool:
return not self == other
--- a/mercurial/windows.py Fri Dec 16 14:24:02 2022 -0500
+++ b/mercurial/windows.py Fri Dec 16 18:14:54 2022 -0500
@@ -664,10 +664,10 @@
class cachestat:
- def __init__(self, path):
+ def __init__(self, path: bytes) -> None:
pass
- def cacheable(self):
+ def cacheable(self) -> bool:
return False