diff options
author | Mats Wichmann <mats@linux.com> | 2023-05-23 16:08:09 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2023-06-16 15:52:15 (GMT) |
commit | cb4d8c9016441047758c8b1f0c0f9ef945d48873 (patch) | |
tree | 0a5fe2b1e3f9d0db5dd189f1f33910b9fcb125c5 /SCons/SConfTests.py | |
parent | 37b85e308bf090f376b74b9098ba76de35486574 (diff) | |
download | SCons-cb4d8c9016441047758c8b1f0c0f9ef945d48873.zip SCons-cb4d8c9016441047758c8b1f0c0f9ef945d48873.tar.gz SCons-cb4d8c9016441047758c8b1f0c0f9ef945d48873.tar.bz2 |
Followon to PR #4348: more bool fixes
Manually fixed up some things related to bool, e.g. simple functions which
just did "return 1" were interpreted by the tool as returning int, when
bool was really the intent. Functions/methods named like "is*", "has*",
"exists", "rexists" (and others) are now pretty consistently marked as
returning bool.
A couple of minor alignments of branched definitions, and a couple
of docstring adjustments made. If Tools which had old heading style
were touched, they got the new style.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/SConfTests.py')
-rw-r--r-- | SCons/SConfTests.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/SCons/SConfTests.py b/SCons/SConfTests.py index 96ba926..2903ba6 100644 --- a/SCons/SConfTests.py +++ b/SCons/SConfTests.py @@ -185,8 +185,8 @@ class SConfTestCase(unittest.TestCase): self.attributes = Attrs() def disambiguate(self): return self - def has_builder(self) -> int: - return 1 + def has_builder(self) -> bool: + return True def add_pre_action(self, *actions) -> None: pass def add_post_action(self, *actions) -> None: @@ -203,14 +203,14 @@ class SConfTestCase(unittest.TestCase): pass def clear(self) -> None: pass - def is_up_to_date(self): - return None + def is_up_to_date(self) -> bool: + return False def prepare(self) -> None: pass def push_to_cache(self) -> None: pass - def retrieve_from_cache(self) -> int: - return 0 + def retrieve_from_cache(self) -> bool: + return False def build(self, **kw) -> None: return def built(self) -> None: |