winipedia-utils 0.1.13__py3-none-any.whl → 0.1.14__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.
- winipedia_utils/oop/mixins/meta.py +9 -7
- {winipedia_utils-0.1.13.dist-info → winipedia_utils-0.1.14.dist-info}/METADATA +1 -1
- {winipedia_utils-0.1.13.dist-info → winipedia_utils-0.1.14.dist-info}/RECORD +5 -5
- {winipedia_utils-0.1.13.dist-info → winipedia_utils-0.1.14.dist-info}/LICENSE +0 -0
- {winipedia_utils-0.1.13.dist-info → winipedia_utils-0.1.14.dist-info}/WHEEL +0 -0
@@ -21,7 +21,7 @@ from winipedia_utils.text.string import value_to_truncated_string
|
|
21
21
|
logger = get_logger(__name__)
|
22
22
|
|
23
23
|
|
24
|
-
class LoggingMeta(
|
24
|
+
class LoggingMeta(ABCMeta):
|
25
25
|
"""Metaclass that automatically adds logging to class methods.
|
26
26
|
|
27
27
|
Wraps non-magic methods with a logging decorator that tracks method calls,
|
@@ -169,7 +169,7 @@ class LoggingMeta(type):
|
|
169
169
|
return wrapper
|
170
170
|
|
171
171
|
|
172
|
-
class ImplementationMeta(
|
172
|
+
class ImplementationMeta(ABCMeta):
|
173
173
|
"""Metaclass that enforces implementation.
|
174
174
|
|
175
175
|
Ensures that concrete subclasses properly implement all required attributes
|
@@ -182,7 +182,9 @@ class ImplementationMeta(type):
|
|
182
182
|
cls: "ImplementationMeta",
|
183
183
|
name: str,
|
184
184
|
bases: tuple[type, ...],
|
185
|
-
|
185
|
+
namespace: dict[str, Any],
|
186
|
+
/,
|
187
|
+
**_kwargs: Any,
|
186
188
|
) -> None:
|
187
189
|
"""Initialize a class with implementation checking.
|
188
190
|
|
@@ -194,7 +196,7 @@ class ImplementationMeta(type):
|
|
194
196
|
cls: The class being initialized
|
195
197
|
name: The name of the class
|
196
198
|
bases: The base classes
|
197
|
-
|
199
|
+
namespace: The attribute dictionary
|
198
200
|
|
199
201
|
Raises:
|
200
202
|
NotImplementedError: If the class doesn't define __abstract__
|
@@ -203,7 +205,7 @@ class ImplementationMeta(type):
|
|
203
205
|
TypeError: If a method is neither final nor abstract
|
204
206
|
|
205
207
|
"""
|
206
|
-
super().__init__(name, bases,
|
208
|
+
super().__init__(name, bases, namespace)
|
207
209
|
|
208
210
|
# Check method decorators regardless of abstract status
|
209
211
|
|
@@ -223,7 +225,7 @@ class ImplementationMeta(type):
|
|
223
225
|
True if the class is abstract, False otherwise
|
224
226
|
|
225
227
|
"""
|
226
|
-
return any(cls.
|
228
|
+
return any(cls.__abstractmethods__)
|
227
229
|
|
228
230
|
def check_method_decorators(cls) -> None:
|
229
231
|
"""Check that all methods are properly decorated with @final or @abstractmethod.
|
@@ -317,7 +319,7 @@ class ImplementationMeta(type):
|
|
317
319
|
return list(attrs)
|
318
320
|
|
319
321
|
|
320
|
-
class ABCImplementationLoggingMeta(ImplementationMeta, LoggingMeta
|
322
|
+
class ABCImplementationLoggingMeta(ImplementationMeta, LoggingMeta):
|
321
323
|
"""Combined metaclass that merges implementation, logging, and ABC functionality.
|
322
324
|
|
323
325
|
This metaclass combines the features of:
|
@@ -30,7 +30,7 @@ winipedia_utils/modules/module.py,sha256=mxaAsRl02CAq_bTW2HsmzRWoyC9jKNM8Q4xdgdQ
|
|
30
30
|
winipedia_utils/modules/package.py,sha256=kCm4pXQdllafo-2dmWZTvaAqRruzh3iF4hseHlCmTlU,12605
|
31
31
|
winipedia_utils/oop/__init__.py,sha256=wGjsVwLbTVEQWOfDJvN9nlvC-3NmAi8Doc2xIrm6e78,47
|
32
32
|
winipedia_utils/oop/mixins/__init__.py,sha256=PDK-cJcdRUfDUCz36qQ5pmMW07G133WtN49OpmILGNI,54
|
33
|
-
winipedia_utils/oop/mixins/meta.py,sha256=
|
33
|
+
winipedia_utils/oop/mixins/meta.py,sha256=gV2YKo_rbJHY9xNCPHhjMmFWuTtiw3C-IGZlh52IZq8,11320
|
34
34
|
winipedia_utils/oop/mixins/mixin.py,sha256=GuYdeueiOIHoRi9ds2ztxUcLnrcsBhHAsbrO43N9AGg,1170
|
35
35
|
winipedia_utils/os/__init__.py,sha256=WSLt7tb6HqWRlCGGIEwRfVksF0sLJNeEW3iZeJhGWk0,47
|
36
36
|
winipedia_utils/os/os.py,sha256=ITuiLLfjGBV2jH8tHQfwVzsICT-jY1zUxtwu3ASJBG4,1690
|
@@ -61,7 +61,7 @@ winipedia_utils/testing/tests/base/utils/utils.py,sha256=dUPDrgAxlfREQb33zz23Mfz
|
|
61
61
|
winipedia_utils/testing/tests/conftest.py,sha256=8RounBlI8Jq1aLaLNpv84MW4ne8Qq0aavQextDOp5ng,920
|
62
62
|
winipedia_utils/text/__init__.py,sha256=j2bwtK6kyeHI6SnoBjpRju0C1W2n2paXBDlNjNtaUxA,48
|
63
63
|
winipedia_utils/text/string.py,sha256=1jbBftlgxffGgSlPnQh3aRPIr8XekEwpSenjFCW6JyM,3478
|
64
|
-
winipedia_utils-0.1.
|
65
|
-
winipedia_utils-0.1.
|
66
|
-
winipedia_utils-0.1.
|
67
|
-
winipedia_utils-0.1.
|
64
|
+
winipedia_utils-0.1.14.dist-info/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
|
65
|
+
winipedia_utils-0.1.14.dist-info/METADATA,sha256=F5AnrujDCkrWAfddP9zJ3Gn8uK1JnvDLQwYdow6d0bA,12385
|
66
|
+
winipedia_utils-0.1.14.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
67
|
+
winipedia_utils-0.1.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|