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

View file

@ -35,7 +35,7 @@ class PyTeXSourceFile:
try: try:
configs = self._formatter.format(GlobalPyTeXConfig.target_root()) configs = self._formatter.format(GlobalPyTeXConfig.target_root())
except Exception as e: except Exception as e:
raise e # TODO raise NotImplementedError
configs = [ configs = [
(self._relative_path.with_name(filename), config) (self._relative_path.with_name(filename), config)
for [filename, config] in configs 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 :return: List of files that will be built when the formatter is invoked
""" """
pass 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() self._root_dir / GlobalPyTeXConfig.wrapper_dir()
) )
except ValueError as e: except ValueError as e:
raise ValueError # TODO raise NotImplementedError
def root_dir_type(self) -> PyTeXRootDirType: def root_dir_type(self) -> PyTeXRootDirType:
return self._pytex_root_dir_type return self._pytex_root_dir_type

View file

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

View file

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