diff --git a/pygitweb/actions.py b/pygitweb/actions.py
index 748dd56..3202dfd 100644
--- a/pygitweb/actions.py
+++ b/pygitweb/actions.py
@@ -91,11 +91,7 @@ def _format_date(epoch: int | None, tz_offset: int | None = None) -> str:
 	if epoch is None:
 		return ""
 	try:
-		tz = (
-			timezone(timedelta(seconds=tz_offset * 60))
-			if tz_offset is not None
-			else UTC
-		)
+		tz = timezone(timedelta(seconds=tz_offset * 60)) if tz_offset is not None else UTC
 		dt = datetime.fromtimestamp(epoch, tz=tz)
 		return dt.strftime("%Y-%m-%d %H:%M:%S")
 	except (ValueError, OSError):
diff --git a/pygitweb/git_helpers.py b/pygitweb/git_helpers.py
index 34a0520..7af85bf 100644
--- a/pygitweb/git_helpers.py
+++ b/pygitweb/git_helpers.py
@@ -543,11 +543,7 @@ def get_commit_unified_diff(project: str, h: str) -> tuple[str, str]:
 	"""
 	repo = open_repo(project)
 	commit = repo.revparse_single(h).peel(pygit2.Commit)
-	diff = (
-		repo.diff(commit.parents[0], commit)
-		if commit.parents
-		else commit.tree.diff_to_tree(swap=True)
-	)
+	diff = repo.diff(commit.parents[0], commit) if commit.parents else commit.tree.diff_to_tree(swap=True)
 	body = diff.patch or ""
 	oid_short = commit.short_id[:7] if len(commit.short_id) >= 7 else commit.short_id
 	return body, oid_short
