From 0625d44efc12b090aa7673ecc7288dde03e8b6da Mon Sep 17 00:00:00 2001 From: alufers Date: Tue, 6 Jun 2023 21:15:05 +0200 Subject: [PATCH] refactor: Improve consistency of indentations, reformat comments, and use active voice in mitmproxy2swagger Improves the consistency of indentations, reformat comments, and updates the passive voice used in function requests_to_headers and mitmproxy2swagger_e2e_test to active voice. --- mitmproxy2swagger/swagger_util.py | 4 ++-- mitmproxy2swagger/testing_util.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mitmproxy2swagger/swagger_util.py b/mitmproxy2swagger/swagger_util.py index 4d50ca8..19b4793 100644 --- a/mitmproxy2swagger/swagger_util.py +++ b/mitmproxy2swagger/swagger_util.py @@ -81,8 +81,8 @@ def url_to_params(url, path_template): def request_to_headers(headers: dict[str, List[Any]], add_example: bool = False): - """When given an url and its path template, generates the parameters section of the - request.""" + """When given an url and its path template, generates the parameters + section of the request.""" params = [] if headers: for key in headers: diff --git a/mitmproxy2swagger/testing_util.py b/mitmproxy2swagger/testing_util.py index 6353513..b4273f9 100644 --- a/mitmproxy2swagger/testing_util.py +++ b/mitmproxy2swagger/testing_util.py @@ -23,8 +23,8 @@ def get_nested_key(obj: Any, path: str) -> Any: def mitmproxy2swagger_e2e_test( input_file: str, url_prefix: str, extra_args: Optional[List[str]] = None ) -> Any: - """Runs mitmproxy2swagger on the given input file twice, and returns the detected - endpoints.""" + """Runs mitmproxy2swagger on the given input file twice, and returns the + detected endpoints.""" yaml_tmp_path = tempfile.mktemp(suffix=".yaml", prefix="sklep.lisek.") main( [