diff --git a/vdirsyncer/cli/tasks.py b/vdirsyncer/cli/tasks.py
index 83014f6..7a94f9f 100644
--- a/vdirsyncer/cli/tasks.py
+++ b/vdirsyncer/cli/tasks.py
@@ -121,9 +121,7 @@ async def repair_collection(
break
else:
raise exceptions.UserError(
- "Couldn't find collection {} for storage {}.".format(
- collection, storage_name
- )
+ f"Couldn't find collection {collection} for storage {storage_name}."
)
config["type"] = storage_type
diff --git a/vdirsyncer/cli/utils.py b/vdirsyncer/cli/utils.py
index 0f48a2e..9cf487f 100644
--- a/vdirsyncer/cli/utils.py
+++ b/vdirsyncer/cli/utils.py
@@ -323,9 +323,7 @@ def assert_permissions(path, wanted):
permissions = os.stat(path).st_mode & 0o777
if permissions > wanted:
cli_logger.warning(
- "Correcting permissions of {} from {:o} to {:o}".format(
- path, permissions, wanted
- )
+ f"Correcting permissions of {path} from {permissions:o} to {wanted:o}"
)
os.chmod(path, wanted)
diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py
index dcaf15e..e21e0aa 100644
--- a/vdirsyncer/storage/dav.py
+++ b/vdirsyncer/storage/dav.py
@@ -198,9 +198,7 @@ class Discover:
# E.g. Synology NAS
# See https://github.com/pimutils/vdirsyncer/issues/498
dav_logger.debug(
- "No current-user-principal returned, re-using URL {}".format(
- response.url
- )
+ f"No current-user-principal returned, re-using URL {response.url}"
)
return response.url.human_repr()
return urlparse.urljoin(str(response.url), rv.text).rstrip("/") + "/"
@@ -649,9 +647,7 @@ class DAVStorage(Storage):
contenttype = getattr(props.find("{DAV:}getcontenttype"), "text", None)
if not self._is_item_mimetype(contenttype):
dav_logger.debug(
- "Skipping {!r}, {!r} != {!r}.".format(
- href, contenttype, self.item_mimetype
- )
+ f"Skipping {href!r}, {contenttype!r} != {self.item_mimetype!r}."
)
continue
@@ -831,9 +827,7 @@ class CalDAVStorage(DAVStorage):
start = start.strftime(CALDAV_DT_FORMAT)
end = end.strftime(CALDAV_DT_FORMAT)
- timefilter = ''.format(
- start=start, end=end
- )
+ timefilter = f''
else:
timefilter = ""
diff --git a/vdirsyncer/sync/__init__.py b/vdirsyncer/sync/__init__.py
index 330a220..d596488 100644
--- a/vdirsyncer/sync/__init__.py
+++ b/vdirsyncer/sync/__init__.py
@@ -205,9 +205,7 @@ class Upload(Action):
href = etag = None
else:
sync_logger.info(
- "Copying (uploading) item {} to {}".format(
- self.ident, self.dest.storage
- )
+ f"Copying (uploading) item {self.ident} to {self.dest.storage}"
)
href, etag = await self.dest.storage.upload(self.item)
assert href is not None