core/modules: get rid of set_repo uses, it was just complicating everythin
This commit is contained in:
parent
0f80e9d5e6
commit
403ec18385
5 changed files with 19 additions and 17 deletions
|
@ -34,9 +34,9 @@ def import_from(path: PathIsh, name: str) -> types.ModuleType:
|
|||
sys.path.remove(path)
|
||||
|
||||
|
||||
def import_dir(path: PathIsh) -> types.ModuleType:
|
||||
def import_dir(path: PathIsh, extra: str='') -> types.ModuleType:
|
||||
p = Path(path)
|
||||
return import_from(p.parent, p.name)
|
||||
return import_from(p.parent, p.name + extra)
|
||||
|
||||
|
||||
T = TypeVar('T')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue