delayed-rm 2.8.0__tar.gz → 2.8.2__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.0
3
+ Version: 2.8.2
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.0"
15
+ __version__ = "2.8.2"
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))
@@ -143,6 +145,7 @@ def delayed_rm(paths: list[Path], delay: int, rf: bool) -> bool:
143
145
  new: Path = outd / p.name
144
146
  try:
145
147
  p.rename(new)
148
+ edited = True
146
149
  except OSError:
147
150
  copyf = lambda src, dst: shutil.copy2(src, dst, follow_symlinks=False)
148
151
  if p.is_dir():
@@ -192,7 +195,7 @@ def delayed_rm(paths: list[Path], delay: int, rf: bool) -> bool:
192
195
  if not edited:
193
196
  shutil.rmtree(base)
194
197
  else:
195
- subprocess.Popen( # pylint: disable=consider-using-with
198
+ subprocess.Popen( # pylint: disable=consider-using-with # nosec B603
196
199
  (sys.executable, __file__, _Secret.value, str(delay), base),
197
200
  env={_Secret.key: _Secret.value},
198
201
  stdout=subprocess.DEVNULL,
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: delayed_rm
3
- Version: 2.8.0
3
+ Version: 2.8.2
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