memorymanagement 1.3.0__tar.gz → 1.4.0__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.
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/PKG-INFO +1 -1
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement/cleaning/core.py +25 -10
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement.egg-info/PKG-INFO +1 -1
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/setup.cfg +1 -1
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/LICENSE +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/README.md +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement/__init__.py +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement/cleaning/__init__.py +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement/pointers/__init__.py +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement/pointers/core.py +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement/pointers/decorators.py +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement.egg-info/SOURCES.txt +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement.egg-info/dependency_links.txt +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement.egg-info/top_level.txt +0 -0
- {memorymanagement-1.3.0 → memorymanagement-1.4.0}/pyproject.toml +0 -0
|
@@ -146,18 +146,23 @@ class Cleaner:
|
|
|
146
146
|
while var in self._excluded:
|
|
147
147
|
self._excluded.remove(var)
|
|
148
148
|
|
|
149
|
-
#
|
|
150
|
-
def
|
|
149
|
+
# Include all excluded variables
|
|
150
|
+
def include_all(self):
|
|
151
151
|
"""
|
|
152
|
-
|
|
153
|
-
Erases all the flagged references.
|
|
152
|
+
Flag all the excluded variables and clear the `excluded` list
|
|
154
153
|
"""
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
self._flagged.extend(self.excluded)
|
|
155
|
+
self._excluded.clear()
|
|
156
|
+
|
|
157
|
+
# Exclude all flagged variables
|
|
158
|
+
def exclude_all(self):
|
|
159
|
+
"""
|
|
160
|
+
Exclude all the flagged variables and clear the `flagged` list
|
|
161
|
+
"""
|
|
162
|
+
self._excluded.extend(self.flagged)
|
|
158
163
|
self._flagged.clear()
|
|
159
164
|
|
|
160
|
-
# Purge
|
|
165
|
+
# Purge flagged and excluded variables
|
|
161
166
|
def purge(self):
|
|
162
167
|
"""
|
|
163
168
|
Clears both `flagged` and `excluded` lists from the `Cleaner` object.
|
|
@@ -165,6 +170,17 @@ class Cleaner:
|
|
|
165
170
|
self._flagged.clear()
|
|
166
171
|
self._excluded.clear()
|
|
167
172
|
|
|
173
|
+
# Clean
|
|
174
|
+
def clean(self):
|
|
175
|
+
"""
|
|
176
|
+
Culminates the cleaning process.
|
|
177
|
+
Erases all the flagged references.
|
|
178
|
+
"""
|
|
179
|
+
for var in self._flagged:
|
|
180
|
+
if var in list(vars(modules["__main__"])):
|
|
181
|
+
del vars(modules["__main__"])[var]
|
|
182
|
+
self._flagged.clear()
|
|
183
|
+
|
|
168
184
|
#* PROPERTIES
|
|
169
185
|
# Variables not to be deleted
|
|
170
186
|
@property
|
|
@@ -205,14 +221,13 @@ class Cleaner:
|
|
|
205
221
|
#* SCREEN DUNDER METHODS
|
|
206
222
|
# __str__
|
|
207
223
|
def __str__(self):
|
|
208
|
-
|
|
224
|
+
return f"""
|
|
209
225
|
Flagged: {self.flagged}
|
|
210
226
|
|
|
211
227
|
Excluded: {self.excluded}
|
|
212
228
|
|
|
213
229
|
Not delete: {self.not_delete}
|
|
214
230
|
"""
|
|
215
|
-
return string
|
|
216
231
|
|
|
217
232
|
# __repr__
|
|
218
233
|
def __repr__(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{memorymanagement-1.3.0 → memorymanagement-1.4.0}/memorymanagement.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|