Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resolved path and base directory to the base Loader class #813

Open
Schamper opened this issue Aug 12, 2024 · 0 comments
Open

Add resolved path and base directory to the base Loader class #813

Schamper opened this issue Aug 12, 2024 · 0 comments
Labels
good first issue Good for newcomers loader Related to a loader component

Comments

@Schamper
Copy link
Member

This pattern of resolving the path and getting the base address is very often repeated across loaders. It should be added to the base Loader class:

def __init__(self, path, **kwargs):
path = path.resolve()
super().__init__(path)
self.vmx = vmx.VMX.parse(path.read_text())
self.base_dir = path.parent

@Schamper Schamper added good first issue Good for newcomers loader Related to a loader component labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers loader Related to a loader component
Projects
None yet
Development

No branches or pull requests

1 participant