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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stdl
3
- Version: 0.5.4
3
+ Version: 0.5.5
4
4
  Summary: Extended Python Standard Library
5
5
  Author-email: Žiga Ivanšek <ziga.ivansek@gmail.com>
6
6
  Project-URL: Repository, https://github.com/zigai/stdl
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stdl"
3
- version = "0.5.4"
3
+ version = "0.5.5"
4
4
  description = "Extended Python Standard Library"
5
5
  authors = [{ name = "Žiga Ivanšek", email = "ziga.ivansek@gmail.com" }]
6
6
  license = { file = "LICENSE.txt" }
@@ -125,7 +125,7 @@ def datetime_fmt(
125
125
  ```
126
126
  """
127
127
  if d is None:
128
- d = datetime.fromtimestamp(time.perf_counter(), **{"tz": timezone.utc} if utc else {})
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.perf_counter(), **{"tz": timezone.utc} if utc else {})
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.perf_counter())
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):
@@ -18,7 +18,6 @@ from datetime import datetime
18
18
  from os import PathLike
19
19
  from pathlib import Path
20
20
  from queue import Queue
21
- from select import select
22
21
 
23
22
  import toml
24
23
  import yaml
@@ -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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stdl
3
- Version: 0.5.4
3
+ Version: 0.5.5
4
4
  Summary: Extended Python Standard Library
5
5
  Author-email: Žiga Ivanšek <ziga.ivansek@gmail.com>
6
6
  Project-URL: Repository, https://github.com/zigai/stdl
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