summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2022-03-30 18:40:48 (GMT)
committerMats Wichmann <mats@linux.com>2022-05-06 12:48:12 (GMT)
commit50eea21b6d1f592ceadee54dee327d716cd3b8b9 (patch)
tree80ef890c6e2677a0b70528b4f8b5bb73195d5ac8
parent29d5619e3e0a22cf542ae255e63216df0f259242 (diff)
downloadSCons-50eea21b6d1f592ceadee54dee327d716cd3b8b9.zip
SCons-50eea21b6d1f592ceadee54dee327d716cd3b8b9.tar.gz
SCons-50eea21b6d1f592ceadee54dee327d716cd3b8b9.tar.bz2
get_timestamp returns an int again
dropped the use of stat.st_mtime, which returns a float, didn't remeber to change the annotation back to int. Added a couple of other return-type annotations. Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--SCons/Node/FS.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/SCons/Node/FS.py b/SCons/Node/FS.py
index 92972c7..b4de337 100644
--- a/SCons/Node/FS.py
+++ b/SCons/Node/FS.py
@@ -1933,7 +1933,7 @@ class Dir(Base):
return self.srcdir
return Base.srcnode(self)
- def get_timestamp(self):
+ def get_timestamp(self) -> int:
"""Return the latest timestamp from among our children"""
stamp = 0
for kid in self.children():
@@ -1941,11 +1941,11 @@ class Dir(Base):
stamp = kid.get_timestamp()
return stamp
- def get_abspath(self):
+ def get_abspath(self) -> str:
"""Get the absolute path of the file."""
return self._abspath
- def get_labspath(self):
+ def get_labspath(self) -> str:
"""Get the absolute path of the file."""
return self._labspath
@@ -2787,7 +2787,7 @@ class File(Base):
return size
@SCons.Memoize.CountMethodCall
- def get_timestamp(self) -> float:
+ def get_timestamp(self) -> int:
try:
return self._memo['get_timestamp']
except KeyError: