Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ruff: Fix PLW0108 Lambda may be unnecessary; consider inlining inner function.
Anders Kaseorg0a98425fd9ee
diff --git a/zerver/lib/typed_endpoint_validators.py b/zerver/lib/typed_endpoint_validators.pyindex 0d690eb3f1f..6616b2fc856 100644--- a/zerver/lib/typed_endpoint_validators.py+++ b/zerver/lib/typed_endpoint_validators.py@@ -69,7 +69,7 @@ def to_timezone_or_empty(s: str) -> str:def timezone_or_empty_validator() -> AfterValidator:- return AfterValidator(lambda s: to_timezone_or_empty(s))+ return AfterValidator(to_timezone_or_empty)def check_timezone(s: str) -> str:@@ -81,7 +81,7 @@ def check_timezone(s: str) -> str:def timezone_validator() -> AfterValidator:- return AfterValidator(lambda s: check_timezone(s))+ return AfterValidator(check_timezone)def to_non_negative_int_or_none(s: str) -> NonNegativeInt | None:@@ -98,7 +98,7 @@ def to_non_negative_int_or_none(s: str) -> NonNegativeInt | None:# type conversion will raise a ValueError if the string is not a valid# integer, and we want to return None in that case.def non_negative_int_or_none_validator() -> BeforeValidator:- return BeforeValidator(lambda s: to_non_negative_int_or_none(s))+ return BeforeValidator(to_non_negative_int_or_none)def check_color(var_name: str, val: object) -> str:diff --git a/zerver/views/realm.py b/zerver/views/realm.pyindex bdfce6a14ca..e7ffd994b91 100644--- a/zerver/views/realm.py+++ b/zerver/views/realm.py@@ -150,7 +150,7 @@ def update_realm(invite_required: Json[bool] | None = None,jitsi_server_url_raw: Annotated[Json[str] | None,- AfterValidator(lambda val: check_jitsi_url(val)),+ AfterValidator(check_jitsi_url),ApiParamConfig("jitsi_server_url"),] = None,message_content_allowed_in_email_notifications: Json[bool] | None = None,