feat(qol): `WorkspaceRunContext.module` should be a method
Open
needs decision
QoL
- Dominant language
- Python
- Stars
- 5.9k
- Forks
- 600
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 38
Description
Given that `WorkspaceRunContext.module` tries to import a Python module, which can be expensive and can have extensive side-effects, it should be a method.
```python
# current code
@property
def module(self) -> Optional[ModuleType]:
try:
return self.import_run_dir_module(self.run_dir)
except (ImportError, TypeError):
return None
```
Calling `dlt.current.workspace().module()` or `.get_module()` better communicates the intent of this operation
Contributor guide
Assessment
This issue has not been assessed yet.