From e638d168efa0b8376142dcd68510179eedc6f4ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 21:09:49 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/PyCQA/docformatter: v1.6.5 → v1.7.1](https://github.com/PyCQA/docformatter/compare/v1.6.5...v1.7.1) - [github.com/adrienverge/yamllint.git: v1.31.0 → v1.32.0](https://github.com/adrienverge/yamllint.git/compare/v1.31.0...v1.32.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb04707..c9acf76 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: hooks: - id: mypy - repo: https://github.com/PyCQA/docformatter - rev: v1.6.5 + rev: v1.7.1 hooks: - id: docformatter args: @@ -53,7 +53,7 @@ repos: args: ["-t=3.9-", "--violations"] # (if your target is specified in a Vermin config, you may omit the 'args' entry entirely) - repo: https://github.com/adrienverge/yamllint.git - rev: v1.31.0 + rev: v1.32.0 hooks: - id: yamllint - repo: https://github.com/igorshubovych/markdownlint-cli From fe6f5fc01c6a30b1a6893ad8a1599d7153b73b0c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 21:11:29 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mitmproxy2swagger/har_capture_reader.py | 3 +-- mitmproxy2swagger/swagger_util.py | 4 ++-- mitmproxy2swagger/testing_util.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mitmproxy2swagger/har_capture_reader.py b/mitmproxy2swagger/har_capture_reader.py index 9304158..9255a88 100644 --- a/mitmproxy2swagger/har_capture_reader.py +++ b/mitmproxy2swagger/har_capture_reader.py @@ -41,8 +41,7 @@ class HarFlowWrapper: return self.flow["request"]["url"] def get_matching_url(self, prefix) -> Union[str, None]: - """Get the requests URL if the prefix matches the URL, None - otherwise.""" + """Get the requests URL if the prefix matches the URL, None otherwise.""" if self.flow["request"]["url"].startswith(prefix): return self.flow["request"]["url"] return None diff --git a/mitmproxy2swagger/swagger_util.py b/mitmproxy2swagger/swagger_util.py index 19b4793..4d50ca8 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 b4273f9..6353513 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( [