summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2024-03-12 18:48:17 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2024-03-12 18:48:17 +0100
commit51d8b1301653856a866053b2ec3d39dd3d782e3f (patch)
tree5f19d5dd5cf8194a59015a3d57df8edd10af6698
parentd70dc2ad3094d865de7b0482ebefce3828441c89 (diff)
version bump and formating
-rw-r--r--script/install.py8
-rw-r--r--src/jwebmail/__init__.py2
-rw-r--r--src/jwebmail/view.py4
3 files changed, 6 insertions, 8 deletions
diff --git a/script/install.py b/script/install.py
index e08f8c5..64a8f7b 100644
--- a/script/install.py
+++ b/script/install.py
@@ -21,10 +21,8 @@ def install_service_unit(prefix):
else:
raise KeyError(match[1])
- service_text_in = open(
- project_path / "script" / "jwebmail.service.in", mode="r"
- ).read()
- service_text = re.sub("@(\w+)@", substitute, service_text_in, flags=re.ASCII)
+ service_text_in = open(project_path / "script" / "jwebmail.service.in").read()
+ service_text = re.sub(r"@(\w+)@", substitute, service_text_in, flags=re.ASCII)
install_path.mkdir(0o755, True, True)
@@ -32,4 +30,4 @@ def install_service_unit(prefix):
if __name__ == "__main__":
- install_service_unit(sys.argv[1] if len(sys.argv) == 2 else '')
+ install_service_unit(sys.argv[1] if len(sys.argv) == 2 else "")
diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py
index 5c31da6..e3c778d 100644
--- a/src/jwebmail/__init__.py
+++ b/src/jwebmail/__init__.py
@@ -34,7 +34,7 @@ else:
toml_read_file = dict(load=toml_load, text=True)
-__version__ = "2.1.0.dev2"
+__version__ = "2.2.0.dev0"
def validate_config(app):
diff --git a/src/jwebmail/view.py b/src/jwebmail/view.py
index 7983c81..d435686 100644
--- a/src/jwebmail/view.py
+++ b/src/jwebmail/view.py
@@ -17,7 +17,7 @@ def print_sizes10(var):
"PByte",
]
- return Markup("{}&nbsp;{}".format(round(var / (10**expo)), PREFIX[i]))
+ return Markup(f"{round(var / (10**expo))}&nbsp;{PREFIX[i]}")
def print_sizes2(var):
@@ -33,7 +33,7 @@ def print_sizes2(var):
"PiByte",
]
- return Markup("{}&nbsp;{}".format(round(var / (2**expo)), PREFIX[i]))
+ return Markup(f"{round(var / (2**expo))}&nbsp;{PREFIX[i]}")
def parse_iso_date(inp):