diff options
author | Mats Wichmann <mats@linux.com> | 2021-05-05 14:37:22 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-05-05 17:33:26 (GMT) |
commit | d7b1df36e2faf84c2b1789658300ceef90605997 (patch) | |
tree | 19d526d9ba9a771f305578f852fa2e6d01894f59 /SCons/Script | |
parent | f046cf47ded412a0b96edb560ed7bb2daf72ccfb (diff) | |
download | SCons-d7b1df36e2faf84c2b1789658300ceef90605997.zip SCons-d7b1df36e2faf84c2b1789658300ceef90605997.tar.gz SCons-d7b1df36e2faf84c2b1789658300ceef90605997.tar.bz2 |
Fix some imports and other checker warnings
* Removed a number of imports reported as unused.
* Reorganize imports in a few places.
* Checker reported warnings problems ("Instantiating an exception,
but not raising it, has no effect"): serveral tool modules instantiated
a warning class thinking (?) it would issue the warning; changed these to
the standard use - calling the warn() function with the warnclass as an arg.
* Tool modules that were touched had the copyright header munging applied.
* Removed irritating "####" lines from gettext and msgfmt tools.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Script')
-rw-r--r-- | SCons/Script/Main.py | 1 | ||||
-rw-r--r-- | SCons/Script/MainTests.py | 3 | ||||
-rw-r--r-- | SCons/Script/SConscriptTests.py | 2 | ||||
-rw-r--r-- | SCons/Script/__init__.py | 2 |
4 files changed, 1 insertions, 7 deletions
diff --git a/SCons/Script/Main.py b/SCons/Script/Main.py index 15f7ece..b674692 100644 --- a/SCons/Script/Main.py +++ b/SCons/Script/Main.py @@ -44,7 +44,6 @@ import re import sys import time import traceback -import sysconfig import platform import threading diff --git a/SCons/Script/MainTests.py b/SCons/Script/MainTests.py index 232a8a2..f7e3263 100644 --- a/SCons/Script/MainTests.py +++ b/SCons/Script/MainTests.py @@ -23,9 +23,6 @@ import unittest -import SCons.Errors -import SCons.Script.Main - # Unit tests of various classes within SCons.Script.Main.py. # # Most of the tests of this functionality are actually end-to-end scripts diff --git a/SCons/Script/SConscriptTests.py b/SCons/Script/SConscriptTests.py index bb88dfa..e6a8be5 100644 --- a/SCons/Script/SConscriptTests.py +++ b/SCons/Script/SConscriptTests.py @@ -21,8 +21,6 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import SCons.Script.SConscript - # all of the SConscript.py tests are in test/SConscript.py # Local Variables: diff --git a/SCons/Script/__init__.py b/SCons/Script/__init__.py index dff1567..5f58d99 100644 --- a/SCons/Script/__init__.py +++ b/SCons/Script/__init__.py @@ -255,7 +255,7 @@ def HelpFunction(text, append=False): if help_text is None: if append: s = StringIO() - PrintHelp(s) + PrintHelp(s) help_text = s.getvalue() s.close() else: |