kenenet 0.0.4__py3-none-any.whl → 0.0.6__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 CHANGED
@@ -1,2 +1,39 @@
1
+ import inspect, sys
2
+
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
+
1
28
  def adding(a, b):
2
29
  return a + b
30
+
31
+ class k:
32
+ pass
33
+
34
+ objs = get_defined_objects()
35
+ for ob in objs:
36
+ setattr(k, ob.__name__, ob)
37
+
38
+ if '__main__' in sys.modules:
39
+ sys.modules['__main__'].__dict__['k'] = k
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kenenet
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: dude what the fuck even is this package
5
5
  Home-page: https://www.youtube.com/@KiddyKene
6
6
  Author: kiddykene
@@ -0,0 +1,5 @@
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,,
@@ -1,5 +0,0 @@
1
- kenenet/__init__.py,sha256=bqxwclgTrQec6-Z6zHmJwdMkh_q06hPzyQHA0unil8E,37
2
- kenenet-0.0.4.dist-info/METADATA,sha256=QNBBzI8WXhnhOXRWX1hEaC4_3aSgbrjlYqoRJ5JOLNA,513
3
- kenenet-0.0.4.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
4
- kenenet-0.0.4.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
- kenenet-0.0.4.dist-info/RECORD,,