python-introspect 0.1.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.
- python_introspect/__init__.py +48 -0
- python_introspect/exceptions.py +21 -0
- python_introspect/signature_analyzer.py +1148 -0
- python_introspect/unified_parameter_analyzer.py +275 -0
- python_introspect-0.1.0.dist-info/METADATA +133 -0
- python_introspect-0.1.0.dist-info/RECORD +9 -0
- python_introspect-0.1.0.dist-info/WHEEL +5 -0
- python_introspect-0.1.0.dist-info/licenses/LICENSE +21 -0
- python_introspect-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""
|
|
2
|
+
python-introspect: Pure Python introspection toolkit
|
|
3
|
+
|
|
4
|
+
This package provides utilities for introspecting Python functions, methods,
|
|
5
|
+
dataclasses, and type hints.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.2"
|
|
9
|
+
|
|
10
|
+
from .signature_analyzer import (
|
|
11
|
+
SignatureAnalyzer,
|
|
12
|
+
ParameterInfo,
|
|
13
|
+
DocstringInfo,
|
|
14
|
+
DocstringExtractor,
|
|
15
|
+
register_namespace_provider,
|
|
16
|
+
register_type_resolver,
|
|
17
|
+
)
|
|
18
|
+
from .unified_parameter_analyzer import (
|
|
19
|
+
UnifiedParameterAnalyzer,
|
|
20
|
+
UnifiedParameterInfo,
|
|
21
|
+
)
|
|
22
|
+
from .exceptions import (
|
|
23
|
+
IntrospectionError,
|
|
24
|
+
SignatureAnalysisError,
|
|
25
|
+
DocstringParsingError,
|
|
26
|
+
TypeResolutionError,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
# Version
|
|
31
|
+
"__version__",
|
|
32
|
+
# Signature analysis
|
|
33
|
+
"SignatureAnalyzer",
|
|
34
|
+
"ParameterInfo",
|
|
35
|
+
"DocstringInfo",
|
|
36
|
+
"DocstringExtractor",
|
|
37
|
+
# Unified analysis
|
|
38
|
+
"UnifiedParameterAnalyzer",
|
|
39
|
+
"UnifiedParameterInfo",
|
|
40
|
+
# Plugin system
|
|
41
|
+
"register_namespace_provider",
|
|
42
|
+
"register_type_resolver",
|
|
43
|
+
# Exceptions
|
|
44
|
+
"IntrospectionError",
|
|
45
|
+
"SignatureAnalysisError",
|
|
46
|
+
"DocstringParsingError",
|
|
47
|
+
"TypeResolutionError",
|
|
48
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Exceptions for python-introspect."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class IntrospectionError(Exception):
|
|
5
|
+
"""Base exception for introspection errors."""
|
|
6
|
+
pass
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SignatureAnalysisError(IntrospectionError):
|
|
10
|
+
"""Exception raised when signature analysis fails."""
|
|
11
|
+
pass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DocstringParsingError(IntrospectionError):
|
|
15
|
+
"""Exception raised when docstring parsing fails."""
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class TypeResolutionError(IntrospectionError):
|
|
20
|
+
"""Exception raised when type resolution fails."""
|
|
21
|
+
pass
|