@@ -31,6 +31,7 @@ from ..beancount_types import (
from typing import (
Any,
Dict,
NoReturn,
Optional,
Set,
)
@@ -43,7 +44,7 @@ class MetaProject(core._NormalizePostingMetadataHook):
def __init__(self, config: configmod.Config, source_path: Path=PROJECT_DATA_PATH) -> None:
repo_path = config.repository_path()
if repo_path is None:
raise self._config_error("no repository configured")
self._config_error("no repository configured")
project_data_path = repo_path / source_path
source = {'filename': str(project_data_path)}
try:
@@ -68,7 +69,7 @@ class MetaProject(core._NormalizePostingMetadataHook):
else:
self.VALUES_ENUM = core.MetadataEnum(self.METADATA_KEY, names, aliases)
def _config_error(self, msg: str, filename: Optional[Path]=None):
def _config_error(self, msg: str, filename: Optional[Path]=None) -> NoReturn:
source = {}
if filename is not None:
source['filename'] = str(filename)