diff options
author | Mats Wichmann <mats@linux.com> | 2023-05-01 11:54:48 -0600 |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2023-05-01 12:06:45 -0600 |
commit | 1a103470a13a83590b3fc06e8779494e2b99751d (patch) | |
tree | ab4b5fcdbc2504ff1436387dbe82db2dcedff22b /testing/framework/TestSConsign.py | |
parent | 0ef81fc03600cd275a8e6733aeca26e0db268dad (diff) | |
download | scons-git-1a103470a13a83590b3fc06e8779494e2b99751d.tar.gz |
Add some cheap return and parameter annotations
Use: https://github.com/JelleZijlstra/autotyping
to add "safe" return annotations.
Where a parameter has a default value that is an obvious scalar type
(bool, int, str, etc.) add those annotations as well.
Also fixed two small bugs that popped up when sanity-checking with
mypy. One in FortranCommon, where a return had been previously
annotated to be a tuple of Action, which should be ActionBase -
Action is the factory function, not the base class. The other was
a typo in the error raised in _add_cppdefines - the message was
formatted with the value of "define" which should have been "defines".
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'testing/framework/TestSConsign.py')
-rw-r--r-- | testing/framework/TestSConsign.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/framework/TestSConsign.py b/testing/framework/TestSConsign.py index b0562bfba..9f02b4937 100644 --- a/testing/framework/TestSConsign.py +++ b/testing/framework/TestSConsign.py @@ -55,7 +55,7 @@ class TestSConsign(TestSCons): "scons" itself, since we need to run scons to generate the .sconsign files that we want the sconsign script to read. """ - def __init__(self, *args, **kw): + def __init__(self, *args, **kw) -> None: try: script_dir = os.environ['SCONS_SCRIPT_DIR'] except KeyError: @@ -92,7 +92,7 @@ class TestSConsign(TestSCons): def script_path(self, script): return os.path.join(self.script_dir, script) - def set_sconsign(self, sconsign): + def set_sconsign(self, sconsign) -> None: self.my_kw['program'] = sconsign def run_sconsign(self, *args, **kw): |