diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-06-08 21:05:29 -0700 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2021-06-08 21:05:29 -0700 |
commit | 273d676853b5373412614ae3d3e85422b5dfcbe7 (patch) | |
tree | 4fe07b91e22e206dc15570afc3352e6e44ba7914 | |
parent | e557fe0760f9c4be10a50cb9382d8692108e1832 (diff) | |
download | scons-git-273d676853b5373412614ae3d3e85422b5dfcbe7.tar.gz |
Address comments in PR
-rw-r--r-- | SCons/Util.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/SCons/Util.py b/SCons/Util.py index 629accc01..b2c305730 100644 --- a/SCons/Util.py +++ b/SCons/Util.py @@ -36,9 +36,10 @@ from types import MethodType, FunctionType # Note: Util module cannot import other bits of SCons globally without getting # into import loops. Both the below modules import SCons.Util early on. +# --> SCons.Warnings +# --> SCons.Errors # Thus the local imports, which are annotated for pylint to show we mean it. -# import SCons.Warnings -# from SCons.Errors import UserError + PYPY = hasattr(sys, 'pypy_translation_info') @@ -87,6 +88,8 @@ def containsOnly(s, pat) -> bool: return False return True + +# TODO: Verify this method is STILL faster than os.path.splitext def splitext(path) -> tuple: """Split `path` into a (root, ext) pair. @@ -515,7 +518,7 @@ def flatten_sequence( StringTypes=StringTypes, SequenceTypes=SequenceTypes, do_flatten=do_flatten, -): # pylint: disable=redefined-outer-name,redefined-builtin +) -> list: # pylint: disable=redefined-outer-name,redefined-builtin """Flatten a sequence to a non-nested list. Same as :func:`flatten`, but it does not handle the single scalar case. @@ -665,7 +668,8 @@ class Proxy: Inherit from this class to create a Proxy. - Note that, with new-style classes, this does *not* work transparently + + With Python 3.5+ this does *not* work transparently for :class:`Proxy` subclasses that use special .__*__() method names, because those names are now bound to the class, not the individual instances. You now need to know in advance which special method names you |