From 6bd11285c1d1f828254798ac94eb1f0207804b10 Mon Sep 17 00:00:00 2001 From: Suyash Vardhan Mathur Date: Mon, 21 Jun 2021 16:31:29 +0530 Subject: [PATCH] openapi: Fix minor assertion in curl examples. Now, include and exclude configuration are fetched from openapi data, and only one type can be encoded for every example. This removes the need for the assertion to test if both include and exclude are present since at a time, only one can be present. --- zerver/openapi/markdown_extension.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/zerver/openapi/markdown_extension.py b/zerver/openapi/markdown_extension.py index 72548bdb7d..4c191134ed 100644 --- a/zerver/openapi/markdown_extension.py +++ b/zerver/openapi/markdown_extension.py @@ -259,8 +259,6 @@ def generate_curl_example( exclude: Optional[List[str]] = None, include: Optional[List[str]] = None, ) -> List[str]: - if exclude is not None and include is not None: - raise AssertionError("exclude and include cannot be set at the same time.") lines = ["```curl"] operation = endpoint + ":" + method.lower()