Skip to content

Commit

Permalink
Use DeprecationWarning for deprecated flags
Browse files Browse the repository at this point in the history
The default for warnings.warn is UserWarning, not DeprecationWarning.

Signed-off-by: John Pennycook <[email protected]>
  • Loading branch information
Pennycook committed Feb 26, 2024
1 parent f445b10 commit c32e0d2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions codebasin.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,15 @@ def main():

# Warnings for deprecated functionality with no planned replacement.
if args.batchmode:
warnings.warn("--batchmode will be removed in a future release.")
warnings.warn(
"--batchmode will be removed in a future release.",
DeprecationWarning,
)
if args.dump:
warnings.warn("--dump will be removed in a future release.")
warnings.warn(
"--dump will be removed in a future release.",
DeprecationWarning,
)

# Determine the root directory based on the -S and -r flags.
rootpath = None
Expand Down

0 comments on commit c32e0d2

Please sign in to comment.