python-utils 3.8.0__tar.gz → 3.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.
Files changed (43) hide show
  1. {python-utils-3.8.0/python_utils.egg-info → python-utils-3.8.2}/PKG-INFO +1 -1
  2. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/test_containers.py +4 -4
  3. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/__about__.py +1 -1
  4. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/containers.py +7 -7
  5. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/time.py +1 -1
  6. {python-utils-3.8.0 → python-utils-3.8.2/python_utils.egg-info}/PKG-INFO +1 -1
  7. {python-utils-3.8.0 → python-utils-3.8.2}/LICENSE +0 -0
  8. {python-utils-3.8.0 → python-utils-3.8.2}/MANIFEST.in +0 -0
  9. {python-utils-3.8.0 → python-utils-3.8.2}/README.rst +0 -0
  10. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/__init__.py +0 -0
  11. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/requirements.txt +0 -0
  12. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/test_aio.py +0 -0
  13. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/test_decorators.py +0 -0
  14. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/test_generators.py +0 -0
  15. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/test_import.py +0 -0
  16. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/test_logger.py +0 -0
  17. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/test_python_utils.py +0 -0
  18. {python-utils-3.8.0 → python-utils-3.8.2}/_python_utils_tests/test_time.py +0 -0
  19. {python-utils-3.8.0 → python-utils-3.8.2}/coverage.rc +0 -0
  20. {python-utils-3.8.0 → python-utils-3.8.2}/pyproject.toml +0 -0
  21. {python-utils-3.8.0 → python-utils-3.8.2}/pytest.ini +0 -0
  22. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/__init__.py +0 -0
  23. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/aio.py +0 -0
  24. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/compat.py +0 -0
  25. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/converters.py +0 -0
  26. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/decorators.py +0 -0
  27. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/exceptions.py +0 -0
  28. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/formatters.py +0 -0
  29. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/generators.py +0 -0
  30. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/import_.py +0 -0
  31. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/logger.py +0 -0
  32. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/loguru.py +0 -0
  33. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/py.typed +0 -0
  34. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/terminal.py +0 -0
  35. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils/types.py +0 -0
  36. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils.egg-info/SOURCES.txt +0 -0
  37. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils.egg-info/dependency_links.txt +0 -0
  38. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils.egg-info/requires.txt +0 -0
  39. {python-utils-3.8.0 → python-utils-3.8.2}/python_utils.egg-info/top_level.txt +0 -0
  40. {python-utils-3.8.0 → python-utils-3.8.2}/requirements.txt +0 -0
  41. {python-utils-3.8.0 → python-utils-3.8.2}/setup.cfg +0 -0
  42. {python-utils-3.8.0 → python-utils-3.8.2}/setup.py +0 -0
  43. {python-utils-3.8.0 → python-utils-3.8.2}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-utils
3
- Version: 3.8.0
3
+ Version: 3.8.2
4
4
  Summary: Python Utils is a module with some convenient utilities not included with the standard Python install
5
5
  Home-page: https://github.com/WoLpH/python-utils
6
6
  Author: Rick van Hattem
@@ -32,7 +32,7 @@ def test_unique_list_raise() -> None:
32
32
 
33
33
 
34
34
  def test_sliceable_deque() -> None:
35
- d: containers.SlicableDeque[int] = containers.SlicableDeque(range(10))
35
+ d: containers.SliceableDeque[int] = containers.SliceableDeque(range(10))
36
36
  assert d[0] == 0
37
37
  assert d[-1] == 9
38
38
  assert d[1:3] == [1, 2]
@@ -49,7 +49,7 @@ def test_sliceable_deque() -> None:
49
49
 
50
50
 
51
51
  def test_sliceable_deque_pop() -> None:
52
- d: containers.SlicableDeque[int] = containers.SlicableDeque(range(10))
52
+ d: containers.SliceableDeque[int] = containers.SliceableDeque(range(10))
53
53
 
54
54
  assert d.pop() == 9 == 9
55
55
  assert d.pop(0) == 0
@@ -65,9 +65,9 @@ def test_sliceable_deque_pop() -> None:
65
65
 
66
66
 
67
67
  def test_sliceable_deque_eq() -> None:
68
- d: containers.SlicableDeque[int] = containers.SlicableDeque([1, 2, 3])
68
+ d: containers.SliceableDeque[int] = containers.SliceableDeque([1, 2, 3])
69
69
  assert d == [1, 2, 3]
70
70
  assert d == (1, 2, 3)
71
71
  assert d == {1, 2, 3}
72
72
  assert d == d
73
- assert d == containers.SlicableDeque([1, 2, 3])
73
+ assert d == containers.SliceableDeque([1, 2, 3])
@@ -7,4 +7,4 @@ __description__: str = (
7
7
  )
8
8
  __url__: str = 'https://github.com/WoLpH/python-utils'
9
9
  # Omit type info due to automatic versioning script
10
- __version__ = '3.8.0'
10
+ __version__ = '3.8.2'
@@ -312,28 +312,28 @@ class UniqueList(types.List[HT]):
312
312
 
313
313
  # Type hinting `collections.deque` does not work consistently between Python
314
314
  # runtime, mypy and pyright currently so we have to ignore the errors
315
- class SlicableDeque(types.Generic[T], collections.deque): # type: ignore
315
+ class SliceableDeque(types.Generic[T], collections.deque): # type: ignore
316
316
  @typing.overload
317
317
  def __getitem__(self, index: types.SupportsIndex) -> T:
318
318
  ...
319
319
 
320
320
  @typing.overload
321
- def __getitem__(self, index: slice) -> 'SlicableDeque[T]':
321
+ def __getitem__(self, index: slice) -> 'SliceableDeque[T]':
322
322
  ...
323
323
 
324
324
  def __getitem__(
325
325
  self, index: types.Union[types.SupportsIndex, slice]
326
- ) -> types.Union[T, 'SlicableDeque[T]']:
326
+ ) -> types.Union[T, 'SliceableDeque[T]']:
327
327
  '''
328
328
  Return the item or slice at the given index.
329
329
 
330
- >>> d = SlicableDeque[int]([1, 2, 3, 4, 5])
330
+ >>> d = SliceableDeque[int]([1, 2, 3, 4, 5])
331
331
  >>> d[1:4]
332
- SlicableDeque([2, 3, 4])
332
+ SliceableDeque([2, 3, 4])
333
333
 
334
- >>> d = SlicableDeque[str](['a', 'b', 'c'])
334
+ >>> d = SliceableDeque[str](['a', 'b', 'c'])
335
335
  >>> d[-2:]
336
- SlicableDeque(['b', 'c'])
336
+ SliceableDeque(['b', 'c'])
337
337
 
338
338
  '''
339
339
  if isinstance(index, slice):
@@ -130,7 +130,7 @@ def format_time(
130
130
 
131
131
  try: # pragma: no cover
132
132
  dt = datetime.datetime.fromtimestamp(seconds)
133
- except ValueError: # pragma: no cover
133
+ except (ValueError, OSError): # pragma: no cover
134
134
  dt = datetime.datetime.max
135
135
  return str(dt)
136
136
  elif isinstance(timestamp, datetime.date):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-utils
3
- Version: 3.8.0
3
+ Version: 3.8.2
4
4
  Summary: Python Utils is a module with some convenient utilities not included with the standard Python install
5
5
  Home-page: https://github.com/WoLpH/python-utils
6
6
  Author: Rick van Hattem
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes