tremors 0.4.0__py3-none-any.whl → 0.4.1__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.
tremors/__init__.py CHANGED
@@ -5,6 +5,6 @@ from tremors.logger import EXTRA_KEY, Collector, Logger
5
5
 
6
6
  __authors__ = ["Narvin Singh"]
7
7
  __project__ = "Tremors"
8
- __version__ = "0.4.0"
8
+ __version__ = "0.4.1"
9
9
 
10
10
  __all__ = ["EXTRA_KEY", "Collector", "Logger", "__version__", "from_logged", "logged"]
tremors/collector.py CHANGED
@@ -14,20 +14,13 @@ fixed signature as described in :class:`Formatter`.
14
14
 
15
15
  import dataclasses
16
16
  import logging
17
- import sys
18
17
  import time
19
- from collections.abc import Mapping
20
- from typing import TYPE_CHECKING, NamedTuple, Protocol
18
+ import uuid # noqa: TC003
19
+ from collections.abc import Callable, Mapping
20
+ from typing import NamedTuple, Protocol
21
21
 
22
22
  import tremors.logger
23
23
 
24
- if TYPE_CHECKING:
25
- import uuid
26
- from collections.abc import Callable
27
- elif "sphinx" in sys.modules:
28
- import uuid # noqa: TC003
29
- from collections.abc import Callable
30
-
31
24
 
32
25
  def get_state[T](typ: type[T], name: str, record: logging.LogRecord) -> T | None:
33
26
  """Get the collector state from a :class:`~logging.LogRecord`.
tremors/decorator.py CHANGED
@@ -5,13 +5,8 @@ and injects that logger into the callable.
5
5
  """
6
6
 
7
7
  import functools
8
- import sys
9
- from typing import TYPE_CHECKING, Any, cast, overload
10
-
11
- if TYPE_CHECKING:
12
- from collections.abc import Callable
13
- elif "sphinx" in sys.modules:
14
- from collections.abc import Callable # noqa: TC003
8
+ from collections.abc import Callable # noqa: TC003
9
+ from typing import Any, cast, overload
15
10
 
16
11
  import tremors.logger
17
12
 
tremors/logger.py CHANGED
@@ -45,16 +45,10 @@ import contextvars
45
45
  import functools
46
46
  import itertools
47
47
  import logging
48
- import sys
49
48
  import uuid
50
- from typing import TYPE_CHECKING, Any, NamedTuple, Self
51
-
52
- if TYPE_CHECKING:
53
- from collections.abc import Callable, Mapping, MutableMapping
54
- from types import TracebackType
55
- elif "sphinx" in sys.modules:
56
- from collections.abc import Callable, Mapping # noqa: TC003
57
- from types import TracebackType # noqa: TC003
49
+ from collections.abc import Callable, Mapping, MutableMapping # noqa: TC003
50
+ from types import TracebackType # noqa: TC003
51
+ from typing import Any, NamedTuple, Self
58
52
 
59
53
  _current_logger: contextvars.ContextVar[Logger | None] = contextvars.ContextVar(
60
54
  "_current_logger", default=None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tremors
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Tremors is a library for logging while collecting metrics.
5
5
  Author-email: Narvin Singh <Narvin.A.Singh@gmail.com>
6
6
  License: Tremors is a library for logging with metrics.
@@ -31,9 +31,10 @@ Requires-Python: >=3.12
31
31
  Description-Content-Type: text/x-rst
32
32
  License-File: LICENSE
33
33
  Provides-Extra: dev
34
+ Requires-Dist: coverage~=7.11; extra == "dev"
34
35
  Requires-Dist: mypy~=1.18; extra == "dev"
35
36
  Requires-Dist: pre-commit~=4.3; extra == "dev"
36
- Requires-Dist: pytest~=8.4; extra == "dev"
37
+ Requires-Dist: pytest~=9.0; extra == "dev"
37
38
  Requires-Dist: ruff~=0.14.2; extra == "dev"
38
39
  Requires-Dist: sphinx-lint~=1.0; extra == "dev"
39
40
  Requires-Dist: yamllint~=1.37; extra == "dev"
@@ -0,0 +1,10 @@
1
+ tremors/__init__.py,sha256=NZyJDz2uNsMTACUxIyW6hgn24OAafTakGm8hWmFv4oA,300
2
+ tremors/collector.py,sha256=QbZhV8nZcgqJl5Q9ZRrQVvFTVZwl2sp0iX_7usdb71k,18390
3
+ tremors/decorator.py,sha256=zbzT0u9TObw0DFhzXk3xY6nXfw0XWN_TK_dwtmpLR5w,3621
4
+ tremors/logger.py,sha256=67Gjez-fRFIYz_Z27NcRqACCZI_wV3lHjDaTyg_FRDc,12457
5
+ tremors/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ tremors-0.4.1.dist-info/licenses/LICENSE,sha256=X__qS-gpV601TSYqaoqkV5YKHLJlfyJ1IHbjOJbdXCw,694
7
+ tremors-0.4.1.dist-info/METADATA,sha256=MAKh2bVGfDjZ-X3Zt9FO5-2wAc6yacyi0LWB2RdX7ZQ,9869
8
+ tremors-0.4.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
+ tremors-0.4.1.dist-info/top_level.txt,sha256=j9lADjMU0C4UHY94-9FAQD7MHtuGDzZgSxtl_iN2kDI,8
10
+ tremors-0.4.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- tremors/__init__.py,sha256=O_T_I0E105fnpKsuLIJncFRuzDR66qojUUFLAVthTiE,300
2
- tremors/collector.py,sha256=ThaFhfh6kpIxauvlRJUi9iEzKcj_lVFJb62PNzAR654,18557
3
- tremors/decorator.py,sha256=nWHwwdQBIRBU9j-zxMApLWVkqP6lrLte1-dOLhY4INY,3741
4
- tremors/logger.py,sha256=kqeDEUfwVwCYgLLfftLH63onnVnVz4a7BFhNzw_36XU,12626
5
- tremors/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- tremors-0.4.0.dist-info/licenses/LICENSE,sha256=X__qS-gpV601TSYqaoqkV5YKHLJlfyJ1IHbjOJbdXCw,694
7
- tremors-0.4.0.dist-info/METADATA,sha256=ffaGA4qoNXPPm2ZfVryqmqdM67oS7xOeE_CZQ7CbvcQ,9823
8
- tremors-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- tremors-0.4.0.dist-info/top_level.txt,sha256=j9lADjMU0C4UHY94-9FAQD7MHtuGDzZgSxtl_iN2kDI,8
10
- tremors-0.4.0.dist-info/RECORD,,