stdl 0.5.4__tar.gz → 0.5.5__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.
- {stdl-0.5.4/stdl.egg-info → stdl-0.5.5}/PKG-INFO +1 -1
- {stdl-0.5.4 → stdl-0.5.5}/pyproject.toml +1 -1
- {stdl-0.5.4 → stdl-0.5.5}/stdl/dt.py +3 -3
- {stdl-0.5.4 → stdl-0.5.5}/stdl/fs.py +0 -1
- {stdl-0.5.4 → stdl-0.5.5}/stdl/st.py +3 -3
- {stdl-0.5.4 → stdl-0.5.5/stdl.egg-info}/PKG-INFO +1 -1
- {stdl-0.5.4 → stdl-0.5.5}/LICENSE +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/README.md +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/setup.cfg +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/setup.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl/__init__.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl/decorators.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl/log.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl/lst.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl/net.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl.egg-info/SOURCES.txt +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl.egg-info/dependency_links.txt +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl.egg-info/requires.txt +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/stdl.egg-info/top_level.txt +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/tests/test_decorators.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/tests/test_dt.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/tests/test_fs.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/tests/test_lst.py +0 -0
- {stdl-0.5.4 → stdl-0.5.5}/tests/test_st.py +0 -0
|
@@ -125,7 +125,7 @@ def datetime_fmt(
|
|
|
125
125
|
```
|
|
126
126
|
"""
|
|
127
127
|
if d is None:
|
|
128
|
-
d = datetime.fromtimestamp(time.
|
|
128
|
+
d = datetime.fromtimestamp(time.time(), **{"tz": timezone.utc} if utc else {})
|
|
129
129
|
|
|
130
130
|
elif isinstance(d, str):
|
|
131
131
|
d = parse_datetime_str(d)
|
|
@@ -162,7 +162,7 @@ def time_fmt(
|
|
|
162
162
|
str: Formated time.
|
|
163
163
|
"""
|
|
164
164
|
if t is None:
|
|
165
|
-
tm = datetime.fromtimestamp(time.
|
|
165
|
+
tm = datetime.fromtimestamp(time.time(), **{"tz": timezone.utc} if utc else {})
|
|
166
166
|
elif isinstance(t, datetime):
|
|
167
167
|
tm = t.time()
|
|
168
168
|
elif isinstance(t, (int, float)):
|
|
@@ -208,7 +208,7 @@ def date_fmt(
|
|
|
208
208
|
```
|
|
209
209
|
"""
|
|
210
210
|
if d is None:
|
|
211
|
-
d = date.fromtimestamp(time.
|
|
211
|
+
d = date.fromtimestamp(time.time())
|
|
212
212
|
elif isinstance(d, (float, int)):
|
|
213
213
|
d = date.fromtimestamp(d)
|
|
214
214
|
elif isinstance(d, datetime):
|
|
@@ -168,9 +168,9 @@ def _get_ansi_value(value: str | None, handler) -> str:
|
|
|
168
168
|
|
|
169
169
|
def colored(
|
|
170
170
|
text: str,
|
|
171
|
-
color: ForegroundColor | None = None,
|
|
172
|
-
background: BackgroundColor | None = None,
|
|
173
|
-
style: Style | None = None,
|
|
171
|
+
color: ForegroundColor | str | None = None,
|
|
172
|
+
background: BackgroundColor | str | None = None,
|
|
173
|
+
style: Style | str | None = None,
|
|
174
174
|
):
|
|
175
175
|
"""
|
|
176
176
|
Returns the text with ansi color, background color and text style codes.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|