delayed-rm 2.9.2__tar.gz → 2.9.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: delayed_rm
3
- Version: 2.9.2
3
+ Version: 2.9.3
4
4
  Summary: Ever wish you had a few minutes to undo an rm? Now you do!
5
5
  License: GPLv3
6
6
  Project-URL: Homepage, https://github.com/zwimer/delayed_rm
@@ -12,7 +12,7 @@ import time
12
12
  import sys
13
13
 
14
14
 
15
- __version__ = "2.9.2"
15
+ __version__ = "2.9.3"
16
16
 
17
17
 
18
18
  #
@@ -229,25 +229,20 @@ def delayed_rm_raw(delay: int, log: bool, r: bool, f: bool, paths: list[Path]) -
229
229
  return True
230
230
 
231
231
 
232
- def main(prog: str, *args: str) -> bool:
233
- base: str = Path(prog).name
234
- parser = argparse.ArgumentParser(prog=base)
235
- parser.add_argument("--version", action="version", version=f"{base} {__version__}")
232
+ def cli() -> None:
233
+ """
234
+ delayed_rm CLI
235
+ """
236
+ parser = argparse.ArgumentParser()
237
+ parser.add_argument("--version", action="version", version=f"{parser.prog} {__version__}")
236
238
  parser.add_argument("--delay", "--ttl", type=int, default=900, help="The deletion delay in seconds")
237
239
  parser.add_argument(
238
- "--log", action="store_true", help=f"Show {base}'s log files; may not be used with other arguments"
240
+ "--log", action="store_true", help=f"Show {parser.prog}'s log files; may not be used with other arguments"
239
241
  )
240
242
  parser.add_argument("-r", action="store_true", help="rm -r; must use -f with this")
241
243
  parser.add_argument("-f", action="store_true", help="rm -f; must use -r with this")
242
244
  parser.add_argument("paths", type=Path, nargs="*", help="The items to delete")
243
- return not delayed_rm_raw(**vars(parser.parse_args(args)))
244
-
245
-
246
- def cli() -> None:
247
- """
248
- delayed_rm CLI
249
- """
250
- sys.exit(main(*sys.argv))
245
+ sys.exit(not delayed_rm_raw(**vars(parser.parse_args())))
251
246
 
252
247
 
253
248
  #
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: delayed_rm
3
- Version: 2.9.2
3
+ Version: 2.9.3
4
4
  Summary: Ever wish you had a few minutes to undo an rm? Now you do!
5
5
  License: GPLv3
6
6
  Project-URL: Homepage, https://github.com/zwimer/delayed_rm
File without changes
File without changes
File without changes
File without changes