diff options
author | William Deegan <bill@baddogconsulting.com> | 2023-05-03 18:20:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 18:20:24 -0700 |
commit | 5717e06c245d99923f5c4a6e786a564799871c49 (patch) | |
tree | 9f61127c1b9bbb2e30a39b316b0f4f3d8430333d /SCons/Errors.py | |
parent | fb846e7091c4b0dbe136ab33eb940b2502a94a29 (diff) | |
parent | f85193fbbfa29e5dff26d12b32726c9638481fba (diff) | |
download | scons-git-5717e06c245d99923f5c4a6e786a564799871c49.tar.gz |
Merge pull request #4346 from mwichmann/maint/cheap-typing
Add some cheap return and parameter annotations
Diffstat (limited to 'SCons/Errors.py')
-rw-r--r-- | SCons/Errors.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/SCons/Errors.py b/SCons/Errors.py index d37cb6de4..b40ba0e74 100644 --- a/SCons/Errors.py +++ b/SCons/Errors.py @@ -71,9 +71,9 @@ class BuildError(Exception): """ def __init__(self, - node=None, errstr="Unknown error", status=2, exitstatus=2, + node=None, errstr: str="Unknown error", status: int=2, exitstatus: int=2, filename=None, executor=None, action=None, command=None, - exc_info=(None, None, None)): + exc_info=(None, None, None)) -> None: # py3: errstr should be string and not bytes. @@ -91,7 +91,7 @@ class BuildError(Exception): super().__init__(node, errstr, status, exitstatus, filename, executor, action, command, exc_info) - def __str__(self): + def __str__(self) -> str: if self.filename: return self.filename + ': ' + self.errstr else: @@ -113,7 +113,7 @@ class MSVCError(IOError): pass class ExplicitExit(Exception): - def __init__(self, node=None, status=None, *args): + def __init__(self, node=None, status=None, *args) -> None: self.node = node self.status = status self.exitstatus = status |