miu-logger 0.1.2__tar.gz → 0.1.4__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.
- {miu_logger-0.1.2/src/miu_logger.egg-info → miu_logger-0.1.4}/PKG-INFO +1 -1
- {miu_logger-0.1.2 → miu_logger-0.1.4}/pyproject.toml +1 -1
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger/repository.py +7 -1
- miu_logger-0.1.4/src/miu_logger/stubgen.py +25 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4/src/miu_logger.egg-info}/PKG-INFO +1 -1
- miu_logger-0.1.2/src/miu_logger/stubgen.py +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/LICENSE +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/README.md +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/setup.cfg +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger/__init__.py +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger/conditional.py +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger/config.py +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger/filters.py +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger/formatters.py +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger/listener.py +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger/logger_factory.py +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger.egg-info/SOURCES.txt +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger.egg-info/dependency_links.txt +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger.egg-info/requires.txt +0 -0
- {miu_logger-0.1.2 → miu_logger-0.1.4}/src/miu_logger.egg-info/top_level.txt +0 -0
|
@@ -73,4 +73,10 @@ class LoggingRepository:
|
|
|
73
73
|
return {"config": self.config, "queue": self.queue}
|
|
74
74
|
|
|
75
75
|
def __setstate__(self, state):
|
|
76
|
-
self.
|
|
76
|
+
self._is_shutdown = False
|
|
77
|
+
self.config = state["config"]
|
|
78
|
+
self.queue = state["queue"]
|
|
79
|
+
self.listener = None
|
|
80
|
+
self._domains = set(self.config.domains)
|
|
81
|
+
self._loggers = {}
|
|
82
|
+
atexit.register(self.shutdown)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Iterable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
TEMPLATE = """from typing import Any
|
|
6
|
+
from miu_logger.conditional import ConditionalLogger
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class LoggingRepository:
|
|
10
|
+
{domains}
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def generate_repository_stub(domains: Iterable[str], out_dir: str = "typings") -> None:
|
|
15
|
+
out_path = Path(out_dir) / "miu_logger"
|
|
16
|
+
out_path.mkdir(parents=True, exist_ok=True)
|
|
17
|
+
|
|
18
|
+
lines = []
|
|
19
|
+
for d in domains:
|
|
20
|
+
lines.append(f" {d}: ConditionalLogger")
|
|
21
|
+
|
|
22
|
+
content = TEMPLATE.format(domains="\n".join(lines))
|
|
23
|
+
|
|
24
|
+
with open(out_path / "repository.pyi", "w") as f:
|
|
25
|
+
f.write(content)
|
|
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
|