Commit 39bdea7b authored by Philipp Hörist's avatar Philipp Hörist

Simplify imports

parent ef339e87
Pipeline #6941 passed with stages
in 10 minutes and 42 seconds
import sys
import importlib
from importlib.abc import MetaPathFinder
from importlib.util import spec_from_file_location
from pathlib import Path
class GUIFinder(importlib.abc.MetaPathFinder):
class GUIFinder(MetaPathFinder):
def __init__(self, name, fallback=None):
self._path = Path(__file__).parent.parent / name
......@@ -22,7 +23,7 @@ def find_spec(self, fullname, _path, _target=None):
if module_path is None:
return None
spec = importlib.util.spec_from_file_location(fullname, module_path)
spec = spec_from_file_location(fullname, module_path)
return spec
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment