diff --git a/corporate/views/billing_page.py b/corporate/views/billing_page.py index de21e07159..7ae475ce6f 100644 --- a/corporate/views/billing_page.py +++ b/corporate/views/billing_page.py @@ -326,7 +326,7 @@ def remote_server_deactivate_page( request: HttpRequest, billing_session: "RemoteServerBillingSession", *, - confirmed: Literal[None, "true"] = None, + confirmed: Literal["true"] | None = None, ) -> HttpResponse: from corporate.lib.stripe import ( ServerDeactivateWithExistingPlanError, diff --git a/corporate/views/remote_billing_page.py b/corporate/views/remote_billing_page.py index 9fb407d337..9eee281709 100644 --- a/corporate/views/remote_billing_page.py +++ b/corporate/views/remote_billing_page.py @@ -63,9 +63,9 @@ billing_logger = logging.getLogger("corporate.stripe") VALID_NEXT_PAGES = [None, "sponsorship", "upgrade", "billing", "plans", "deactivate"] -VALID_NEXT_PAGES_TYPE: TypeAlias = Literal[ - None, "sponsorship", "upgrade", "billing", "plans", "deactivate" -] +VALID_NEXT_PAGES_TYPE: TypeAlias = ( + Literal["sponsorship", "upgrade", "billing", "plans", "deactivate"] | None +) REMOTE_BILLING_SIGNED_ACCESS_TOKEN_VALIDITY_IN_SECONDS = 2 * 60 * 60 # We use units of hours here so that we can pass this through to the @@ -152,9 +152,9 @@ def remote_realm_billing_finalize_login( *, signed_billing_access_token: PathOnly[str], full_name: str | None = None, - tos_consent: Literal[None, "true"] = None, - enable_major_release_emails: Literal[None, "true", "false"] = None, - enable_maintenance_release_emails: Literal[None, "true", "false"] = None, + tos_consent: Literal["true"] | None = None, + enable_major_release_emails: Literal["true", "false"] | None = None, + enable_maintenance_release_emails: Literal["true", "false"] | None = None, ) -> HttpResponse: """ This is the endpoint accessed via the billing_access_url, generated by @@ -673,9 +673,9 @@ def remote_billing_legacy_server_from_login_confirmation_link( *, confirmation_key: PathOnly[str], full_name: str | None = None, - tos_consent: Literal[None, "true"] = None, - enable_major_release_emails: Literal[None, "true", "false"] = None, - enable_maintenance_release_emails: Literal[None, "true", "false"] = None, + tos_consent: Literal["true"] | None = None, + enable_major_release_emails: Literal["true", "false"] | None = None, + enable_maintenance_release_emails: Literal["true", "false"] | None = None, ) -> HttpResponse: """ The user comes here via the confirmation link they received via email. diff --git a/zerver/lib/event_types.py b/zerver/lib/event_types.py index e24eff92d2..ab90d87102 100644 --- a/zerver/lib/event_types.py +++ b/zerver/lib/event_types.py @@ -903,7 +903,7 @@ class EventStreamUpdateCore(BaseEvent): type: Literal["stream"] op: Literal["update"] property: str - value: bool | int | str | UserGroupMembersDict | Literal[None] + value: bool | int | str | UserGroupMembersDict | None name: str stream_id: int