Skip to content

Commit

Permalink
Merge pull request #69 from Pennycook/fix-deprecation-warnings
Browse files Browse the repository at this point in the history
Make all deprecation warnings DeprecationWarnings
  • Loading branch information
Pennycook authored Mar 1, 2024
2 parents e853423 + f1eeff4 commit 87cbffd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/codebasin
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,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)
Expand Down Expand Up @@ -211,7 +212,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}")
Expand All @@ -231,6 +235,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(
Expand Down

0 comments on commit 87cbffd

Please sign in to comment.