dycw-utilities 0.175.35__py3-none-any.whl → 0.175.36__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.35.dist-info → dycw_utilities-0.175.36.dist-info}/METADATA +1 -1
- {dycw_utilities-0.175.35.dist-info → dycw_utilities-0.175.36.dist-info}/RECORD +6 -6
- utilities/__init__.py +1 -1
- utilities/tempfile.py +22 -5
- {dycw_utilities-0.175.35.dist-info → dycw_utilities-0.175.36.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.175.35.dist-info → dycw_utilities-0.175.36.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
utilities/__init__.py,sha256=
|
|
1
|
+
utilities/__init__.py,sha256=7QvekuGqm3-JdDS498qZrn1_4tah8Zape8NgpwbTKUc,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
|
|
@@ -81,7 +81,7 @@ utilities/sqlalchemy_polars.py,sha256=JCGhB37raSR7fqeWV5dTsciRTMVzIdVT9YSqKT0piT
|
|
|
81
81
|
utilities/statsmodels.py,sha256=koyiBHvpMcSiBfh99wFUfSggLNx7cuAw3rwyfAhoKpQ,3410
|
|
82
82
|
utilities/string.py,sha256=shmBK87zZwzGyixuNuXCiUbqzfeZ9xlrFwz6JTaRvDk,582
|
|
83
83
|
utilities/subprocess.py,sha256=4IAEpK0z5OUQ3hsCJFZgkF2TW-osdrBJODaEhMAuQ_Q,53751
|
|
84
|
-
utilities/tempfile.py,sha256=
|
|
84
|
+
utilities/tempfile.py,sha256=4kRGd4hyINDX4hpcYMtwzDcd-4IKjpTWT0MnjnKD4hE,4221
|
|
85
85
|
utilities/testbook.py,sha256=j1KmaVbrX9VrbeMgtPh5gk55myAsn3dyRUn7jGbPbRk,1294
|
|
86
86
|
utilities/text.py,sha256=7SvwcSR2l_5cOrm1samGnR4C-ZI6qyFLHLzSpO1zeHQ,13958
|
|
87
87
|
utilities/threading.py,sha256=GvBOp4CyhHfN90wGXZuA2VKe9fGzMaEa7oCl4f3nnPU,1009
|
|
@@ -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.36.dist-info/WHEEL,sha256=RRVLqVugUmFOqBedBFAmA4bsgFcROUBiSUKlERi0Hcg,79
|
|
101
|
+
dycw_utilities-0.175.36.dist-info/entry_points.txt,sha256=cOGtKeJI0KXLSV7MJ8Dhc2G8jPgDcBDm53MVNJU4ycI,136
|
|
102
|
+
dycw_utilities-0.175.36.dist-info/METADATA,sha256=baQ9cqXdr7o8gURScaioDS4t0Cg3ODkxCO79ptarTL8,1443
|
|
103
|
+
dycw_utilities-0.175.36.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/tempfile.py
CHANGED
|
@@ -92,12 +92,19 @@ def TemporaryFile( # noqa: N802
|
|
|
92
92
|
delete=delete,
|
|
93
93
|
) as temp_dir,
|
|
94
94
|
_temporary_file_outer(
|
|
95
|
-
temp_dir,
|
|
95
|
+
temp_dir,
|
|
96
|
+
suffix=suffix,
|
|
97
|
+
prefix=prefix,
|
|
98
|
+
delete=delete,
|
|
99
|
+
name=name,
|
|
100
|
+
text=text,
|
|
96
101
|
) as temp,
|
|
97
102
|
):
|
|
98
103
|
yield temp
|
|
99
104
|
else:
|
|
100
|
-
with _temporary_file_outer(
|
|
105
|
+
with _temporary_file_outer(
|
|
106
|
+
dir, suffix=suffix, prefix=prefix, delete=delete, name=name, text=text
|
|
107
|
+
) as temp:
|
|
101
108
|
yield temp
|
|
102
109
|
|
|
103
110
|
|
|
@@ -106,11 +113,15 @@ def _temporary_file_outer(
|
|
|
106
113
|
path: PathLike,
|
|
107
114
|
/,
|
|
108
115
|
*,
|
|
116
|
+
suffix: str | None = None,
|
|
117
|
+
prefix: str | None = None,
|
|
109
118
|
delete: bool = True,
|
|
110
119
|
name: str | None = None,
|
|
111
120
|
text: str | None = None,
|
|
112
121
|
) -> Iterator[Path]:
|
|
113
|
-
with _temporary_file_inner(
|
|
122
|
+
with _temporary_file_inner(
|
|
123
|
+
path, suffix=suffix, prefix=prefix, delete=delete, name=name
|
|
124
|
+
) as temp:
|
|
114
125
|
if text is not None:
|
|
115
126
|
_ = temp.write_text(text)
|
|
116
127
|
yield temp
|
|
@@ -118,11 +129,17 @@ def _temporary_file_outer(
|
|
|
118
129
|
|
|
119
130
|
@contextmanager
|
|
120
131
|
def _temporary_file_inner(
|
|
121
|
-
path: PathLike,
|
|
132
|
+
path: PathLike,
|
|
133
|
+
/,
|
|
134
|
+
*,
|
|
135
|
+
suffix: str | None = None,
|
|
136
|
+
prefix: str | None = None,
|
|
137
|
+
delete: bool = True,
|
|
138
|
+
name: str | None = None,
|
|
122
139
|
) -> Iterator[Path]:
|
|
123
140
|
path = Path(path)
|
|
124
141
|
temp = _NamedTemporaryFile( # noqa: SIM115
|
|
125
|
-
dir=path, delete=delete, delete_on_close=False
|
|
142
|
+
suffix=suffix, prefix=prefix, dir=path, delete=delete, delete_on_close=False
|
|
126
143
|
)
|
|
127
144
|
if name is None:
|
|
128
145
|
yield path / temp.name
|
|
File without changes
|
|
File without changes
|