diff --git a/pygitweb/validation.py b/pygitweb/validation.py
index 9d00d86..cbbc101 100644
--- a/pygitweb/validation.py
+++ b/pygitweb/validation.py
@@ -55,9 +55,7 @@ def is_valid_ref_format(input_ref: str | None) -> bool:
 	if input_ref.endswith("/") or input_ref.endswith(".lock"):
 		return False
 	# No ASCII control, space, ~^:?*[
-	if re.search(r"[\x00-\x20\x7f ~^:?*\[\]]", input_ref):
-		return False
-	return True
+	return not re.search(r"[\x00-\x20\x7f ~^:?*\[\]]", input_ref)
 
 
 def is_valid_refname(input_ref: str | None) -> bool:
@@ -86,9 +84,7 @@ def check_export_ok(
 		return False
 	if export_ok and not os.path.isfile(os.path.join(git_dir, export_ok)):
 		return False
-	if export_auth_hook is not None and not export_auth_hook(git_dir):
-		return False
-	return True
+	return not export_auth_hook or export_auth_hook(git_dir)
 
 
 def is_valid_action(action: str | None, allowed_actions: set[str]) -> bool:
@@ -113,6 +109,4 @@ def is_valid_project(
 		return False
 	if not check_export_ok(full, export_ok):
 		return False
-	if strict_export and not project_in_list(project):
-		return False
-	return True
+	return not strict_export or project_in_list(project)
