dycw-utilities 0.175.9__py3-none-any.whl → 0.175.11__py3-none-any.whl
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.
- {dycw_utilities-0.175.9.dist-info → dycw_utilities-0.175.11.dist-info}/METADATA +1 -1
- {dycw_utilities-0.175.9.dist-info → dycw_utilities-0.175.11.dist-info}/RECORD +6 -6
- utilities/__init__.py +1 -1
- utilities/subprocess.py +17 -9
- {dycw_utilities-0.175.9.dist-info → dycw_utilities-0.175.11.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.175.9.dist-info → dycw_utilities-0.175.11.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
utilities/__init__.py,sha256=
|
|
1
|
+
utilities/__init__.py,sha256=pZfUnqzTRDXqR9ZFvrf8z7wgNBe-67XtkKIPhS7xjN4,61
|
|
2
2
|
utilities/altair.py,sha256=TLfRFbG9HwG7SLXoJ-v0r-t49ZaGgTQZD82cpjVi4vs,9085
|
|
3
3
|
utilities/asyncio.py,sha256=aJySVxBY0gqsIYnoNmH7-1r8djKuf4vSsU69VCD08t8,16772
|
|
4
4
|
utilities/atomicwrites.py,sha256=tPo6r-Rypd9u99u66B9z86YBPpnLrlHtwox_8Z7T34Y,5790
|
|
@@ -80,7 +80,7 @@ utilities/sqlalchemy.py,sha256=HQYpd7LFxdTF5WYVWYtCJeEBI71EJm7ytvCGyAH9B-U,37163
|
|
|
80
80
|
utilities/sqlalchemy_polars.py,sha256=JCGhB37raSR7fqeWV5dTsciRTMVzIdVT9YSqKT0piT0,13370
|
|
81
81
|
utilities/statsmodels.py,sha256=koyiBHvpMcSiBfh99wFUfSggLNx7cuAw3rwyfAhoKpQ,3410
|
|
82
82
|
utilities/string.py,sha256=shmBK87zZwzGyixuNuXCiUbqzfeZ9xlrFwz6JTaRvDk,582
|
|
83
|
-
utilities/subprocess.py,sha256=
|
|
83
|
+
utilities/subprocess.py,sha256=NmPV4ffjNmZjOKPTrmKqYu-9CrENgQC424iyedMmUes,41275
|
|
84
84
|
utilities/tempfile.py,sha256=QyvIdfV4r4YZ0NeNYsg0tCijThLKa7Z32u5Kxy6ZsGo,3619
|
|
85
85
|
utilities/testbook.py,sha256=j1KmaVbrX9VrbeMgtPh5gk55myAsn3dyRUn7jGbPbRk,1294
|
|
86
86
|
utilities/text.py,sha256=7SvwcSR2l_5cOrm1samGnR4C-ZI6qyFLHLzSpO1zeHQ,13958
|
|
@@ -97,7 +97,7 @@ utilities/warnings.py,sha256=un1LvHv70PU-LLv8RxPVmugTzDJkkGXRMZTE2-fTQHw,1771
|
|
|
97
97
|
utilities/whenever.py,sha256=F4ek0-OBWxHYrZdmoZt76N2RnNyKY5KrEHt7rqO4AQE,60183
|
|
98
98
|
utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
|
|
99
99
|
utilities/zoneinfo.py,sha256=tdIScrTB2-B-LH0ukb1HUXKooLknOfJNwHk10MuMYvA,3619
|
|
100
|
-
dycw_utilities-0.175.
|
|
101
|
-
dycw_utilities-0.175.
|
|
102
|
-
dycw_utilities-0.175.
|
|
103
|
-
dycw_utilities-0.175.
|
|
100
|
+
dycw_utilities-0.175.11.dist-info/WHEEL,sha256=RRVLqVugUmFOqBedBFAmA4bsgFcROUBiSUKlERi0Hcg,79
|
|
101
|
+
dycw_utilities-0.175.11.dist-info/entry_points.txt,sha256=cOGtKeJI0KXLSV7MJ8Dhc2G8jPgDcBDm53MVNJU4ycI,136
|
|
102
|
+
dycw_utilities-0.175.11.dist-info/METADATA,sha256=zmxiIJNvxjQFtfwvwYy4kMJeFDrVeKrS9e9CsZEgN_s,1443
|
|
103
|
+
dycw_utilities-0.175.11.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/subprocess.py
CHANGED
|
@@ -349,21 +349,21 @@ def mv_cmd(src: PathLike, dest: PathLike, /) -> list[str]:
|
|
|
349
349
|
##
|
|
350
350
|
|
|
351
351
|
|
|
352
|
-
def rm(path: PathLike, /,
|
|
352
|
+
def rm(path: PathLike, /, *paths: PathLike, sudo: bool = False) -> None:
|
|
353
353
|
"""Remove a file/directory."""
|
|
354
354
|
if sudo: # pragma: no cover
|
|
355
|
-
run(*sudo_cmd(*rm_cmd(path)))
|
|
355
|
+
run(*sudo_cmd(*rm_cmd(path, *paths)))
|
|
356
356
|
else:
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
357
|
+
for p in map(Path, [path, *paths]):
|
|
358
|
+
if p.is_file():
|
|
359
|
+
p.unlink(missing_ok=True)
|
|
360
|
+
elif p.is_dir():
|
|
361
|
+
rmtree(p, ignore_errors=True)
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
def rm_cmd(path: PathLike,
|
|
364
|
+
def rm_cmd(path: PathLike, /, *paths: PathLike) -> list[str]:
|
|
365
365
|
"""Command to use 'rm' to remove a file/directory."""
|
|
366
|
-
return ["rm", "-rf", str(path)]
|
|
366
|
+
return ["rm", "-rf", str(path), *map(str, paths)]
|
|
367
367
|
|
|
368
368
|
|
|
369
369
|
##
|
|
@@ -1243,6 +1243,13 @@ def touch_cmd(path: PathLike, /) -> list[str]:
|
|
|
1243
1243
|
##
|
|
1244
1244
|
|
|
1245
1245
|
|
|
1246
|
+
def update_ca_certificates(*, sudo: bool = False) -> None:
|
|
1247
|
+
run(*maybe_sudo_cmd(UPDATE_CA_CERTIFICATES, sudo=sudo)) # pragma: no cover
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
##
|
|
1251
|
+
|
|
1252
|
+
|
|
1246
1253
|
@overload
|
|
1247
1254
|
def uv_run(
|
|
1248
1255
|
module: str,
|
|
@@ -1459,6 +1466,7 @@ __all__ = [
|
|
|
1459
1466
|
"tee_cmd",
|
|
1460
1467
|
"touch",
|
|
1461
1468
|
"touch_cmd",
|
|
1469
|
+
"update_ca_certificates",
|
|
1462
1470
|
"uv_run",
|
|
1463
1471
|
"uv_run_cmd",
|
|
1464
1472
|
"yield_git_repo",
|
|
File without changes
|
|
File without changes
|