From f1eeff43824fdbcba2747a3fab481a1b265d1625 Mon Sep 17 00:00:00 2001 From: John Pennycook Date: Thu, 29 Feb 2024 13:55:24 -0800 Subject: [PATCH] Make all deprecation warnings DeprecationWarnings Signed-off-by: John Pennycook --- bin/codebasin | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/codebasin b/bin/codebasin index 6bc0f8f..5c76f7b 100755 --- a/bin/codebasin +++ b/bin/codebasin @@ -174,6 +174,7 @@ def main(): elif args.rootdir: warnings.warn( "--rootdir (-r) is deprecated. Use --source-dir (-S) instead.", + DeprecationWarning, ) rootpath = args.rootdir rootdir = os.path.realpath(rootpath) @@ -210,7 +211,10 @@ def main(): len(additional_platforms) == 0 and args.analysis_file is None ) if config_file is None and config_required: - warnings.warn("Implicitly defined configuration files are deprecated.") + warnings.warn( + "Implicitly defined configuration files are deprecated.", + DeprecationWarning, + ) config_file = os.path.join(rootdir, "config.yaml") if not os.path.exists(config_file): raise RuntimeError(f"Could not find config file {config_file}") @@ -230,6 +234,7 @@ def main(): warnings.warn( "YAML configuration files are deprecated. " + "Use TOML analysis files instead.", + DeprecationWarning, ) if not util.ensure_yaml(config_file): logging.getLogger("codebasin").error(