Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

ruff: Fix RET501 Do not explicitly `return None` in function if it is the only possible return value.

Anders Kaseorgcb8499df9583
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index 120bfe97804..18e57b509a7 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -4151,7 +4151,7 @@ class BillingSession(ABC):
plan_tier = CustomerPlan.TIER_SELF_HOSTED_LEGACY
if isinstance(self, RealmBillingSession): # nocoverage
# TODO implement a complimentary access plan/tier for Zulip Cloud.
- return None
+ return
customer = self.update_or_create_customer()
complimentary_access_plan = self.create_customer_plan(
diff --git a/zerver/lib/import_realm.py b/zerver/lib/import_realm.py
index cf6ee8a8f76..42792f5bb57 100644
--- a/zerver/lib/import_realm.py
+++ b/zerver/lib/import_realm.py
@@ -1071,7 +1071,7 @@ def fix_subscriptions_is_user_active_column(
def process_avatars(sanitized_record: SanitizedRecord) -> None:
if not sanitized_record.safe_resolved_source_path.endswith(".original"):
- return None
+ return
user_profile = get_user_profile_by_id(sanitized_record.raw_record["user_profile_id"])
if settings.LOCAL_AVATARS_DIR is not None:
avatar_path = user_avatar_base_path_from_ids(