use NotImplementedError

This commit is contained in:
Maximilian Keßler 2022-02-05 19:05:50 +01:00
parent 89f4bcbe0b
commit e74c081e42
6 changed files with 10 additions and 7 deletions

View file

@ -24,7 +24,7 @@ class TeXType(Enum):
'strip': TeXType.TeXDocstrip
}
if tex_type not in switcher.keys():
raise ValueError # TODO
raise NotImplementedError
else:
return switcher[tex_type]
@ -46,7 +46,7 @@ class TeXFlavour(Enum):
'LateX3': TeXFlavour.LaTeX3
}
if flavour not in switcher.keys():
raise ValueError # TODO
raise NotImplementedError
else:
return switcher[flavour]

View file

@ -35,7 +35,7 @@ class PyTeXSourceFile:
try:
configs = self._formatter.format(GlobalPyTeXConfig.target_root())
except Exception as e:
raise e # TODO
raise NotImplementedError
configs = [
(self._relative_path.with_name(filename), config)
for [filename, config] in configs

View file

@ -23,3 +23,6 @@ class Formatter:
:return: List of files that will be built when the formatter is invoked
"""
pass
def set_input_file(self, locate_config=True) -> None:
raise NotImplementedError

View file

@ -33,7 +33,7 @@ class PyTeXPurePath(PurePath):
self._root_dir / GlobalPyTeXConfig.wrapper_dir()
)
except ValueError as e:
raise ValueError # TODO
raise NotImplementedError
def root_dir_type(self) -> PyTeXRootDirType:
return self._pytex_root_dir_type

View file

@ -31,7 +31,7 @@ class RelativePath(Path):
try:
self._relative_path = self.relative_to(self._root_dir)
except ValueError as e:
raise ValueError # TODO
raise NotImplementedError
@property
def root_dir_type(self) -> PyTeXRootDirType:

View file

@ -8,7 +8,7 @@ class GitVersionInfo:
x in dictionary.keys() for
x in [JSON_BRANCH, JSON_COMMIT_HASH]
):
raise ValueError # TODO
raise NotImplementedError
self._dirty: bool = dictionary[JSON_DIRTY]
self._commit_hash: str = dictionary[JSON_COMMIT_HASH]
@ -39,7 +39,7 @@ class GitVersionInfo:
class FileVersionInfo:
def __init__(self, dictionary: dict):
if JSON_MD5_CHECKSUM not in dictionary.keys():
raise ValueError # TODO
raise NotImplementedError
else:
self._md5_checksum = dictionary[JSON_MD5_CHECKSUM]