diff options
author | Mats Wichmann <mats@linux.com> | 2024-03-05 14:08:19 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2024-03-08 19:07:39 (GMT) |
commit | 14b5110b31b596990238f5b8eb5814e5090b2aa8 (patch) | |
tree | 23948558c2f7b800d4843495181632748837b6ab /SCons/Script/SConsOptions.py | |
parent | 3b168f538bff5506bd32921ea803ff1e9078ddda (diff) | |
download | SCons-14b5110b31b596990238f5b8eb5814e5090b2aa8.zip SCons-14b5110b31b596990238f5b8eb5814e5090b2aa8.tar.gz SCons-14b5110b31b596990238f5b8eb5814e5090b2aa8.tar.bz2 |
Cleanup Warnings module
* Added docstrings on warning classes and module docstring.
* Move globals to top of file.
* Typing.
* Dropped DeprecatedSourceCodeWarning, last use was removed, with the
feature, for SCons 3.1.2.
* Dropped TaskmasterNeedsExecuteWarning, now enforced by Python via an
abstract base class (unused/unneeded since 4.0.0).
* Dropped DeprecatedMissingSConscriptWarning. This was a transitional
warning, no longer needed; can use MissingSConscriptWarning, which
also is no longer used but is left in in case it might be useful.
* Two in-use warnings added to manpage section on enabling warnings
(cache-cleanup-error, future-reserved-variable).
* Improve unittest a bit.
* Sphinx build set not to show inherited memerber for Warnings -
got ugly exception stuff otherwise.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Script/SConsOptions.py')
-rw-r--r-- | SCons/Script/SConsOptions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/SCons/Script/SConsOptions.py b/SCons/Script/SConsOptions.py index 18fe0e4..e8e5cbf 100644 --- a/SCons/Script/SConsOptions.py +++ b/SCons/Script/SConsOptions.py @@ -875,9 +875,9 @@ def Parser(version): def warn_md5_chunksize_deprecated(option, opt, value, parser) -> None: if opt == '--md5-chunksize': - SCons.Warnings.warn(SCons.Warnings.DeprecatedWarning, - "Parameter %s is deprecated. Use " - "--hash-chunksize instead." % opt) + SCons.Warnings.warn(SCons.Warnings.DeprecatedOptionsWarning, + f"Option {opt} is deprecated. " + "Use --hash-chunksize instead.") setattr(parser.values, option.dest, value) |