You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-3Lines changed: 38 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,14 @@ A Python library that analyzes module dependencies and performs recursive reload
15
15
-**Relative Import Support**: Properly handles relative imports within packages
16
16
-**Circular Import Support**: Correctly reloads circular imports that work in Python
17
17
18
+
## Supported Versions
19
+
20
+
- Maya 2022
21
+
- Maya 2023
22
+
- Maya 2024
23
+
- Maya 2025
24
+
- Maya 2026
25
+
18
26
## Installation
19
27
20
28
The package can be placed anywhere in the Python path.
@@ -26,10 +34,10 @@ This README uses Maya's common scripts folder as an example.
26
34
├── __init__.py
27
35
├── _metadata.py
28
36
├── deep_reloader.py
37
+
├── dependency_extractor.py
38
+
├── domain.py
29
39
├── from_clause.py
30
40
├── import_clause.py
31
-
├── module_info.py
32
-
├── symbol_extractor.py
33
41
├── LICENSE
34
42
├── README.md
35
43
└── tests/
@@ -97,7 +105,7 @@ pytest tests/ -q
97
105
- Python 3.11.9+ (verified in current development environment)
98
106
- pytest 8.4.2+ (required for running tests)
99
107
100
-
**Note**: The above is the environment used for library testing and development. It differs from the Maya execution environment. Supported Maya versions are not yet finalized.
108
+
**Note**: The above is the environment used for library testing and development. It differs from the Maya execution environment.
101
109
102
110
## Limitations and Known Issues
103
111
@@ -134,6 +142,33 @@ isinstance(my_class, MyClass) # False (my_class is an instance of old MyClass,
134
142
-`from .xxx import yyy` style
135
143
-`from . import yyy` style
136
144
145
+
### Modules Not Explicitly Imported in `__init__.py` Are Not Detected When Importing the Package (By Design)
146
+
147
+
Since AST analysis parses the `__init__.py` code, modules under the package cannot be detected if they are not explicitly imported there.
148
+
149
+
**Example**:
150
+
151
+
File structure:
152
+
-`mypackage/__init__.py` (empty)
153
+
-`mypackage/utils.py`
154
+
-`main.py`
155
+
156
+
```python
157
+
# main.py
158
+
import mypackage
159
+
160
+
# Reload the package
161
+
deep_reload(mypackage)
162
+
mypackage.utils.some_function() # utils is not reloaded
163
+
```
164
+
165
+
**Workaround**: Reload the module directly
166
+
```python
167
+
# main.py
168
+
from mypackage import utils
169
+
deep_reload(utils)
170
+
```
171
+
137
172
### Single Package Reload Only (By Design)
138
173
139
174
`deep_reload()` only reloads modules that belong to the same package as the passed module.
0 commit comments