summaryrefslogtreecommitdiff
path: root/SCons/Util/envs.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2023-05-03 18:20:24 -0700
committerGitHub <noreply@github.com>2023-05-03 18:20:24 -0700
commit5717e06c245d99923f5c4a6e786a564799871c49 (patch)
tree9f61127c1b9bbb2e30a39b316b0f4f3d8430333d /SCons/Util/envs.py
parentfb846e7091c4b0dbe136ab33eb940b2502a94a29 (diff)
parentf85193fbbfa29e5dff26d12b32726c9638481fba (diff)
downloadscons-git-5717e06c245d99923f5c4a6e786a564799871c49.tar.gz
Merge pull request #4346 from mwichmann/maint/cheap-typing
Add some cheap return and parameter annotations
Diffstat (limited to 'SCons/Util/envs.py')
-rw-r--r--SCons/Util/envs.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/SCons/Util/envs.py b/SCons/Util/envs.py
index 963c963a8..64e728a8c 100644
--- a/SCons/Util/envs.py
+++ b/SCons/Util/envs.py
@@ -16,7 +16,7 @@ from .types import is_List, is_Tuple, is_String
def PrependPath(
- oldpath, newpath, sep=os.pathsep, delete_existing=True, canonicalize=None
+ oldpath, newpath, sep=os.pathsep, delete_existing: bool=True, canonicalize=None
) -> Union[list, str]:
"""Prepend *newpath* path elements to *oldpath*.
@@ -102,7 +102,7 @@ def PrependPath(
def AppendPath(
- oldpath, newpath, sep=os.pathsep, delete_existing=True, canonicalize=None
+ oldpath, newpath, sep=os.pathsep, delete_existing: bool=True, canonicalize=None
) -> Union[list, str]:
"""Append *newpath* path elements to *oldpath*.
@@ -187,7 +187,7 @@ def AppendPath(
return sep.join(paths)
-def AddPathIfNotExists(env_dict, key, path, sep=os.pathsep):
+def AddPathIfNotExists(env_dict, key, path, sep=os.pathsep) -> None:
"""Add a path element to a construction variable.
`key` is looked up in `env_dict`, and `path` is added to it if it
@@ -229,7 +229,7 @@ class MethodWrapper:
a new underlying object being copied (without which we wouldn't need
to save that info).
"""
- def __init__(self, obj, method, name=None):
+ def __init__(self, obj, method, name=None) -> None:
if name is None:
name = method.__name__
self.object = obj
@@ -265,7 +265,7 @@ class MethodWrapper:
# is not needed, the remaining bit is now used inline in AddMethod.
-def AddMethod(obj, function, name=None):
+def AddMethod(obj, function, name=None) -> None:
"""Add a method to an object.
Adds *function* to *obj* if *obj* is a class object.