Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
custom_profile_fields: Replace a type: ignore with an assert.
Anders Kaseorg1d545efac247
diff --git a/zerver/views/custom_profile_fields.py b/zerver/views/custom_profile_fields.pyindex 57ac632debc..a200f548a97 100644--- a/zerver/views/custom_profile_fields.py+++ b/zerver/views/custom_profile_fields.py@@ -98,8 +98,8 @@ def create_realm_custom_profile_field(request: HttpRequest,validate_custom_profile_field(name, hint, field_type, field_data)try:if is_default_external_field(field_type, field_data):- field_subtype: str = ''- field_subtype = field_data['subtype'] # type: ignore[assignment] # key for "Union[Dict[str, str], str]" can be str+ field_subtype = field_data['subtype']+ assert isinstance(field_subtype, str)field = try_add_realm_default_custom_profile_field(realm=user_profile.realm,field_subtype=field_subtype,