mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-10 00:34:29 +00:00
weird python relative import error from not having version naming
This commit is contained in:
parent
1f61dca46f
commit
321740f674
1 changed files with 7 additions and 1 deletions
|
@ -189,7 +189,13 @@ class Provider(ABC):
|
||||||
namespace_path = module_path / 'models' / 'pydantic'
|
namespace_path = module_path / 'models' / 'pydantic'
|
||||||
builtin_namespaces = list(namespace_path.iterdir())
|
builtin_namespaces = list(namespace_path.iterdir())
|
||||||
|
|
||||||
for ns_dir in builtin_namespaces + list(self.path.iterdir()):
|
try:
|
||||||
|
tmp_paths = list(self.path.iterdir())
|
||||||
|
except FileNotFoundError:
|
||||||
|
# fine, just return the builtins
|
||||||
|
tmp_paths = []
|
||||||
|
|
||||||
|
for ns_dir in builtin_namespaces + tmp_paths:
|
||||||
if not ns_dir.is_dir():
|
if not ns_dir.is_dir():
|
||||||
continue
|
continue
|
||||||
if ns_dir.name not in versions.keys():
|
if ns_dir.name not in versions.keys():
|
||||||
|
|
Loading…
Reference in a new issue