kenenet 0.0.6__py3-none-any.whl → 0.0.8__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.
- kenenet/__init__.py +5 -28
- {kenenet-0.0.6.dist-info → kenenet-0.0.8.dist-info}/METADATA +1 -1
- kenenet-0.0.8.dist-info/RECORD +5 -0
- kenenet-0.0.6.dist-info/RECORD +0 -5
- {kenenet-0.0.6.dist-info → kenenet-0.0.8.dist-info}/WHEEL +0 -0
- {kenenet-0.0.6.dist-info → kenenet-0.0.8.dist-info}/top_level.txt +0 -0
kenenet/__init__.py
CHANGED
@@ -1,39 +1,16 @@
|
|
1
1
|
import inspect, sys
|
2
2
|
|
3
3
|
|
4
|
-
def get_defined_objects():
|
5
|
-
current_module = sys.modules[__name__]
|
6
|
-
objects = {}
|
7
|
-
|
8
|
-
for name, obj in globals().items():
|
9
|
-
# Ignore built-in functions and modules
|
10
|
-
if name.startswith("__") or inspect.ismodule(obj):
|
11
|
-
continue
|
12
|
-
|
13
|
-
# Ignore imported objects (they will have a different module)
|
14
|
-
if hasattr(obj, "__module__") and obj.__module__ != current_module.__name__:
|
15
|
-
continue
|
16
|
-
|
17
|
-
# Ignore objects defined inside functions (nested scope)
|
18
|
-
if inspect.isfunction(obj) and obj.__qualname__ != obj.__name__:
|
19
|
-
continue
|
20
|
-
if inspect.isclass(obj) and "." in obj.__qualname__:
|
21
|
-
continue
|
22
|
-
|
23
|
-
objects[name] = obj
|
24
|
-
|
25
|
-
return objects
|
26
|
-
|
27
|
-
|
28
4
|
def adding(a, b):
|
29
5
|
return a + b
|
30
6
|
|
7
|
+
|
31
8
|
class k:
|
32
9
|
pass
|
33
10
|
|
34
|
-
|
35
|
-
|
36
|
-
|
11
|
+
|
12
|
+
k.adding = adding
|
13
|
+
|
37
14
|
|
38
15
|
if '__main__' in sys.modules:
|
39
|
-
sys.modules['__main__'].__dict__['k'] = k
|
16
|
+
sys.modules['__main__'].__dict__['k'] = k
|
@@ -0,0 +1,5 @@
|
|
1
|
+
kenenet/__init__.py,sha256=thkalKm0wlXU6y4z0Wfjs3BpsouaX4TWTM-GO7bxWLo,191
|
2
|
+
kenenet-0.0.8.dist-info/METADATA,sha256=_G-XrrLzTrg3hXqhaKn8xiVUMnDHcm_f0ZC7dhCs9jk,513
|
3
|
+
kenenet-0.0.8.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
4
|
+
kenenet-0.0.8.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
+
kenenet-0.0.8.dist-info/RECORD,,
|
kenenet-0.0.6.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
kenenet/__init__.py,sha256=huXGxn29ZjLVHA7WvFMq5lc0-ctxGYjquUEMtiGdDoo,1026
|
2
|
-
kenenet-0.0.6.dist-info/METADATA,sha256=mNqRX5wVt3jofpNskg5lHQ11-e4w4VcL3bFSHg09Mn0,513
|
3
|
-
kenenet-0.0.6.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
4
|
-
kenenet-0.0.6.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
-
kenenet-0.0.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|