Skip to content

Commit

Permalink
fam
Browse files Browse the repository at this point in the history
  • Loading branch information
latentvector committed Sep 4, 2024
1 parent 4415cb4 commit c926c20
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 0 additions & 4 deletions commune/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ def wrapper_fn2(fn, *args, **kwargs):
fn = fn.split('.')[-1]
return getattr(c, fn)(*args, **kwargs)
for k, fn in utils.items():
print(fn)
setattr(obj, k, partial(wrapper_fn2, fn))
return {'success': True, 'message': 'added utils'}
route_cache = None
Expand Down Expand Up @@ -748,7 +747,6 @@ def fn_generator( *args, module_ph, fn_ph, **kwargs):
if fns in ['all', '*']:
fns = c.functions(m)
for fn in fns:

# resolve the from and to function names
from_fn, to_fn = cls.resolve_to_from_fn_routes(fn)
# create a partial function that is bound to the module
Expand Down Expand Up @@ -2196,7 +2194,6 @@ def code(cls, module = None, search=None, *args, **kwargs):
if '/' in str(module) or module in cls.fns():
return cls.fn_code(module)
module = cls.resolve_object(module)
print(module)
text = cls.get_text( module.filepath(), *args, **kwargs)
if search != None:
find_lines = cls.find_lines(text=text, search=search)
Expand Down Expand Up @@ -3116,7 +3113,6 @@ def simple2objectpath(cls,
def simple2object(cls, path:str = None, **kwargs) -> str:
path = path or 'module'
path = c.simple2objectpath(path, **kwargs)
print(path)
try:
return cls.import_object(path)
except:
Expand Down
1 change: 1 addition & 0 deletions commune/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ utils.network:
- free_ports
- get_available_ports
- resolve_ip
- is_valid_ip

utils.asyncio:
- gather
Expand Down

0 comments on commit c926c20

Please sign in to comment.