mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-09 13:52:00 -04:00
BIOSUtilities v24.10.18
Removed all Python built-in library keyword arguments (#55)
This commit is contained in:
parent
010b5a47d4
commit
35455f735c
27 changed files with 228 additions and 229 deletions
|
@ -28,7 +28,7 @@ def get_external_path(cmd: str | list | tuple) -> str:
|
|||
external_path: str | None = external_root if is_dir(in_path=external_root) else None
|
||||
|
||||
for command in cmd if isinstance(cmd, (list, tuple)) else [to_string(in_object=cmd)]:
|
||||
command_path: str | None = shutil.which(cmd=command, path=external_path)
|
||||
command_path: str | None = shutil.which(command, path=external_path)
|
||||
|
||||
if command_path and is_file(in_path=command_path):
|
||||
return command_path
|
||||
|
@ -42,16 +42,15 @@ def big_script_tool() -> Type | None:
|
|||
try:
|
||||
bgst: str = get_external_path(cmd='big_script_tool')
|
||||
|
||||
bgst_spec: ModuleSpec | None = spec_from_file_location(
|
||||
name='big_script_tool', location=re.sub(r'\.PY$', '.py', bgst))
|
||||
bgst_spec: ModuleSpec | None = spec_from_file_location('big_script_tool', re.sub(r'\.PY$', '.py', bgst))
|
||||
|
||||
if bgst_spec and isinstance(bgst_spec.loader, Loader):
|
||||
bgst_module: ModuleType | None = module_from_spec(spec=bgst_spec)
|
||||
bgst_module: ModuleType | None = module_from_spec(bgst_spec)
|
||||
|
||||
if bgst_module:
|
||||
sys.modules['big_script_tool'] = bgst_module
|
||||
|
||||
bgst_spec.loader.exec_module(module=bgst_module)
|
||||
bgst_spec.loader.exec_module(bgst_module)
|
||||
|
||||
return getattr(bgst_module, 'BigScript')
|
||||
except OSError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue