add nothing_formatter.py
This commit is contained in:
parent
3fcb05af18
commit
55f1af8bb8
1 changed files with 25 additions and 0 deletions
25
PyTeX/format/nothing_formatter.py
Normal file
25
PyTeX/format/nothing_formatter.py
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
from .formatting_config import FormattingConfig
|
||||||
|
from .pytex_formatter import PyTeXFormatter
|
||||||
|
from pathlib import Path
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from typing import List, Tuple
|
||||||
|
|
||||||
|
|
||||||
|
class NothingFormatter(PyTeXFormatter):
|
||||||
|
"""
|
||||||
|
Class that will represent a source file that
|
||||||
|
should not be formatted.
|
||||||
|
|
||||||
|
This is modeled by not having any output files,
|
||||||
|
so the builder will never consider building this file
|
||||||
|
"""
|
||||||
|
|
||||||
|
def output_files(self) -> List[str]:
|
||||||
|
return []
|
||||||
|
|
||||||
|
def format(self, build_dir: Path, overwrite: bool = False) -> List[Tuple[str, FormattingConfig]]:
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def dependencies(self) -> List[str]:
|
||||||
|
return []
|
Loading…
Reference in a new issue