delayed-rm 2.8.1__tar.gz → 2.9.0__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,11 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: delayed_rm
3
- Version: 2.8.1
3
+ Version: 2.9.0
4
4
  Summary: Ever wish you had a few minutes to undo an rm? Now you do!
5
- License: GPL
5
+ License: GPLv3
6
6
  Project-URL: Homepage, https://github.com/zwimer/delayed_rm
7
+ Keywords: rm
7
8
  Classifier: Programming Language :: Python :: 3
8
9
  Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
9
12
  Requires-Python: >=3.10
10
13
  Description-Content-Type: text/markdown
11
14
  License-File: LICENSE
@@ -12,7 +12,7 @@ import sys
12
12
  import os
13
13
 
14
14
 
15
- __version__ = "2.8.1"
15
+ __version__ = "2.9.0"
16
16
 
17
17
 
18
18
  #
@@ -43,7 +43,7 @@ class _Secret:
43
43
  """
44
44
 
45
45
  key: str = "DELAYED_RM_SECRET_CLI"
46
- value: str = "cL5r0!L4hmWmonW7k^RZM*4nq7mR&yfF"
46
+ value: str = "--:://'cL5r0!L4hmWmonW7k^RZM*4nq7mR&yfF"
47
47
 
48
48
 
49
49
  #
@@ -114,8 +114,10 @@ def delayed_rm(paths: list[Path], delay: int, rf: bool) -> bool:
114
114
  May raise an RMError if something goes wrong
115
115
  :returns: True on success, else False
116
116
  """
117
- assert tmp_d.parent.exists(), "Temp dir enclosing directory does not exist"
118
- assert log_f.parent.exists(), "Log file enclosing directory does not exist"
117
+ if not tmp_d.parent.exists():
118
+ raise RuntimeError("Temp dir enclosing directory does not exist")
119
+ if not log_f.parent.exists():
120
+ raise RuntimeError("Log file enclosing directory does not exist")
119
121
  # Prep
120
122
  paths = _prep(paths, rf)
121
123
  base = Path(tempfile.mkdtemp(dir=tmp_d))
@@ -193,7 +195,7 @@ def delayed_rm(paths: list[Path], delay: int, rf: bool) -> bool:
193
195
  if not edited:
194
196
  shutil.rmtree(base)
195
197
  else:
196
- subprocess.Popen( # pylint: disable=consider-using-with
198
+ subprocess.Popen( # pylint: disable=consider-using-with # nosec B603
197
199
  (sys.executable, __file__, _Secret.value, str(delay), base),
198
200
  env={_Secret.key: _Secret.value},
199
201
  stdout=subprocess.DEVNULL,
@@ -237,7 +239,7 @@ def main(prog: str, *args: str) -> bool:
237
239
  base: str = os.path.basename(prog)
238
240
  parser = argparse.ArgumentParser(prog=base)
239
241
  parser.add_argument("--version", action="version", version=f"{base} {__version__}")
240
- parser.add_argument("-d", "--delay", type=int, default=900, help="The deletion delay in seconds")
242
+ parser.add_argument("--delay", "--ttl", type=int, default=900, help="The deletion delay in seconds")
241
243
  parser.add_argument(
242
244
  "--log", action="store_true", help=f"Show {base}'s log files; may not be used with other arguments"
243
245
  )
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: delayed_rm
3
- Version: 2.8.1
3
+ Version: 2.9.0
4
4
  Summary: Ever wish you had a few minutes to undo an rm? Now you do!
5
- License: GPL
5
+ License: GPLv3
6
6
  Project-URL: Homepage, https://github.com/zwimer/delayed_rm
7
+ Keywords: rm
7
8
  Classifier: Programming Language :: Python :: 3
8
9
  Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
9
12
  Requires-Python: >=3.10
10
13
  Description-Content-Type: text/markdown
11
14
  License-File: LICENSE
@@ -7,8 +7,11 @@ name = "delayed_rm"
7
7
  classifiers = [
8
8
  "Programming Language :: Python :: 3",
9
9
  "Programming Language :: Python :: 3.10",
10
+ "Development Status :: 5 - Production/Stable",
11
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
10
12
  ]
11
- license = {text = "GPL"}
13
+ keywords = ["rm"]
14
+ license = {text = "GPLv3"}
12
15
  description = "Ever wish you had a few minutes to undo an rm? Now you do!"
13
16
  urls = {Homepage = "https://github.com/zwimer/delayed_rm"}
14
17
  requires-python = ">= 3.10"
@@ -38,10 +41,17 @@ version = {attr = "delayed_rm.__version__"}
38
41
 
39
42
  [tool.black]
40
43
  line-length = 120
41
- target-version = ["py310"]
44
+ target-version = ["py310", "py311", "py312"]
42
45
 
43
46
  [tool.ruff]
44
47
  ignore=["E731","E741"]
45
48
  line-length = 120
46
49
  [tool.ruff.per-file-ignores]
47
50
  "__init__.py" = ["F401", "F403"]
51
+
52
+ [tool.bandit]
53
+ skips = ["B404"]
54
+
55
+ [tool.vulture]
56
+ ignore_names = ["cli"]
57
+ paths = ["delayed_rm"]
File without changes
File without changes
File without changes