-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
latentvector
committed
Sep 3, 2024
1 parent
04d357b
commit b9ffee8
Showing
55 changed files
with
6,870 additions
and
12,455 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,13 @@ | ||
|
||
|
||
|
||
from .module.module import Module | ||
from .module import Module | ||
from functools import partial | ||
# set the module functions as globals | ||
for k,v in Module.__dict__.items(): | ||
globals()[k] = v | ||
|
||
# for f in : | ||
# globals()[f] = getattr(Module, f) | ||
|
||
for f in Module.class_functions() + Module.static_functions(): | ||
globals()[f] = getattr(Module, f) | ||
|
||
for f in Module.self_functions(): | ||
def wrapper_fn(f, *args, **kwargs): | ||
try: | ||
fn = getattr(Module(), f) | ||
except: | ||
fn = getattr(Module, f) | ||
return fn(*args, **kwargs) | ||
globals()[f] = partial(wrapper_fn, f) | ||
|
||
|
||
|
||
c = Block = Lego = M = Module # alias c.Module as c.Block, c.Lego, c.M | ||
c.add_to_globals(globals()) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.