orionis 0.296.0__py3-none-any.whl → 0.298.0__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.
- orionis/metadata/framework.py +1 -1
- orionis/services/introspection/exceptions/reflection_attribute_error.py +26 -0
- orionis/services/introspection/instances/entities/class_property.py +24 -0
- orionis/services/introspection/instances/reflection_instance.py +1436 -0
- orionis/support/abstracts/entities/__init__.py +0 -0
- orionis/support/helpers/__init__.py +0 -0
- orionis/support/introspection/instances/contracts/reflection_instance.py +1 -1
- orionis/support/introspection/instances/reflection_instance.py +1 -1
- {orionis-0.296.0.dist-info → orionis-0.298.0.dist-info}/METADATA +1 -1
- {orionis-0.296.0.dist-info → orionis-0.298.0.dist-info}/RECORD +22 -21
- tests/support/inspection/fakes/fake_reflect_instance.py +56 -2
- orionis/support/introspection/instances/entities/class_attributes.py +0 -11
- orionis/support/introspection/instances/entities/class_method.py +0 -18
- orionis/support/introspection/instances/entities/class_parsed.py +0 -18
- orionis/support/introspection/instances/entities/class_property.py +0 -13
- /orionis/services/introspection/{abstracts → instances}/__init__.py +0 -0
- /orionis/services/introspection/{abstracts → instances}/entities/__init__.py +0 -0
- /orionis/{services/introspection/helpers → support/abstracts}/__init__.py +0 -0
- /orionis/{services/introspection → support}/abstracts/entities/abstract_class_attributes.py +0 -0
- /orionis/{services/introspection → support}/abstracts/reflect_abstract.py +0 -0
- /orionis/{services/introspection → support}/helpers/functions.py +0 -0
- /orionis/{services/introspection → support}/reflection.py +0 -0
- {orionis-0.296.0.dist-info → orionis-0.298.0.dist-info}/WHEEL +0 -0
- {orionis-0.296.0.dist-info → orionis-0.298.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.296.0.dist-info → orionis-0.298.0.dist-info}/top_level.txt +0 -0
- {orionis-0.296.0.dist-info → orionis-0.298.0.dist-info}/zip-safe +0 -0
orionis/metadata/framework.py
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
class ReflectionAttributeError(Exception):
|
2
|
+
"""
|
3
|
+
Base class for all reflection-related exceptions.
|
4
|
+
"""
|
5
|
+
|
6
|
+
def __init__(self, msg: str):
|
7
|
+
"""
|
8
|
+
Initialize the exception with a custom error message.
|
9
|
+
|
10
|
+
Parameters
|
11
|
+
----------
|
12
|
+
msg : str
|
13
|
+
The error message describing the exception.
|
14
|
+
"""
|
15
|
+
super().__init__(msg)
|
16
|
+
|
17
|
+
def __str__(self) -> str:
|
18
|
+
"""
|
19
|
+
Return a string representation of the exception, including the class name and the first argument.
|
20
|
+
|
21
|
+
Returns
|
22
|
+
-------
|
23
|
+
str
|
24
|
+
A formatted string with the exception class name and the first argument.
|
25
|
+
"""
|
26
|
+
return f"{self.__class__.__name__}: {self.args[0]}"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
import inspect
|
3
|
+
from typing import Any
|
4
|
+
|
5
|
+
@dataclass(frozen=True, kw_only=True)
|
6
|
+
class ClassProperty:
|
7
|
+
"""
|
8
|
+
Represents a property of a class with its metadata.
|
9
|
+
|
10
|
+
Parameters
|
11
|
+
----------
|
12
|
+
name : str
|
13
|
+
The name of the property.
|
14
|
+
value : Any
|
15
|
+
The value assigned to the property.
|
16
|
+
signature : inspect.Signature
|
17
|
+
The signature of the property, typically used for callable properties.
|
18
|
+
doc : str
|
19
|
+
The documentation string associated with the property.
|
20
|
+
"""
|
21
|
+
name: str
|
22
|
+
value: Any
|
23
|
+
signature: inspect.Signature
|
24
|
+
doc: str
|