From 75c528c3dff1572d86e1dd7ed94056e61a063eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 6 Feb 2022 22:20:16 +0100 Subject: [PATCH] add path method --- PyTeX/format/generic_text.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PyTeX/format/generic_text.py b/PyTeX/format/generic_text.py index 40a0780..437b505 100644 --- a/PyTeX/format/generic_text.py +++ b/PyTeX/format/generic_text.py @@ -1,6 +1,6 @@ from pathlib import Path from typing import Union, List, Optional -from ..logger import logger +from ..logger import logger class GenericText: @@ -33,6 +33,9 @@ class GenericText: self._content = None self._path = content + def path(self) -> Optional[Path]: + return self._path + def format(self, **kwargs) -> str: lines = [] for line in self._content: