From 8f43b3af56d65af401ffe6f2528e2f52b2ed2569 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Thu, 16 Nov 2023 09:45:29 +0100 Subject: [PATCH 1/5] models:reference_files - add literal typing to ReplaceAction.template Add most common template types: * empty * password-protected * corrupted * not-preservable * not-convertable --- acacore/models/reference_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acacore/models/reference_files.py b/acacore/models/reference_files.py index cb27425..ca8eb0d 100644 --- a/acacore/models/reference_files.py +++ b/acacore/models/reference_files.py @@ -56,7 +56,7 @@ class ReplaceAction(BaseModel): template (str): The replacement template. """ - template: str + template: Literal["empty", "password-protected", "corrupted", "not-preservable", "not-convertable"] class ManualAction(BaseModel): From e2e815722edc3dc22961bde2acecd51d88a10393 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Thu, 16 Nov 2023 09:46:42 +0100 Subject: [PATCH 2/5] models:reference_files - add ReplaceAction.template_text property and "text" to template types To set custom template text --- acacore/models/reference_files.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acacore/models/reference_files.py b/acacore/models/reference_files.py index ca8eb0d..87618b8 100644 --- a/acacore/models/reference_files.py +++ b/acacore/models/reference_files.py @@ -56,7 +56,8 @@ class ReplaceAction(BaseModel): template (str): The replacement template. """ - template: Literal["empty", "password-protected", "corrupted", "not-preservable", "not-convertable"] + template: Literal["text", "empty", "password-protected", "corrupted", "not-preservable", "not-convertable"] + template_text: Optional[str] = None class ManualAction(BaseModel): From c72cb02760938b3dda288e68ff67fcf5e91afbca Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Thu, 16 Nov 2023 09:47:44 +0100 Subject: [PATCH 3/5] models:reference_files - update ReplaceAction docstring --- acacore/models/reference_files.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/acacore/models/reference_files.py b/acacore/models/reference_files.py index 87618b8..6c08040 100644 --- a/acacore/models/reference_files.py +++ b/acacore/models/reference_files.py @@ -54,6 +54,8 @@ class ReplaceAction(BaseModel): Attributes: template (str): The replacement template. + template_text (Optional[str]): Optional. Text to use instead of the default template, + if template is set to "text". """ template: Literal["text", "empty", "password-protected", "corrupted", "not-preservable", "not-convertable"] From 7f6974058dc756e6517caeed33ecf119ae074df7 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Thu, 16 Nov 2023 09:52:39 +0100 Subject: [PATCH 4/5] version - patch 1.0.1 > 1.0.2 --- acacore/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acacore/__version__.py b/acacore/__version__.py index 5c4105c..7863915 100644 --- a/acacore/__version__.py +++ b/acacore/__version__.py @@ -1 +1 @@ -__version__ = "1.0.1" +__version__ = "1.0.2" From a95f3e843416b28b9da5a89afcebd0cbb3b3ef69 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Thu, 16 Nov 2023 09:52:39 +0100 Subject: [PATCH 5/5] poetry - version patch 1.0.1 > 1.0.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 00e7d42..aad5540 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "acacore" -version = "1.0.1" +version = "1.0.2" description = "" authors = ["Matteo Campinoti "] license = "GPL-3.0"