From 9de52e313d48dfcbe942a73ec7db9dbee5f8e303 Mon Sep 17 00:00:00 2001 From: "Doncho N. Gunchev" Date: Thu, 25 Jan 2024 15:59:29 +0200 Subject: [PATCH] Cosmetics... --- httpdecho.py | 3 ++- tox.ini | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/httpdecho.py b/httpdecho.py index 817126e..94416e6 100755 --- a/httpdecho.py +++ b/httpdecho.py @@ -62,7 +62,8 @@ def get_message(self): message["Method"] = self.command message["Path"] = self.path - server_url = parse.SplitResult("http", f"{self.server.server_name}:{self.server.server_port}", "", "", "") + server_url = parse.SplitResult(scheme="http", netloc=f"{self.server.server_name}:{self.server.server_port}", + path="", query="", fragment="") request_url = parse.urlsplit(server_url.geturl() + self.path) for name, value in parse.parse_qs(request_url.query).items(): message.add_header(name, value[0]) diff --git a/tox.ini b/tox.ini index a437d0e..9ccaf18 100644 --- a/tox.ini +++ b/tox.ini @@ -13,9 +13,9 @@ isolated_build = true commands = check-manifest # confirm items checked into vcs are in your sdist python setup.py check -m -s # confirm required package meta-data in setup.py - # stop the build if there are Python syntax errors or undefined names +# stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide +# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics python -m pytest . @@ -35,5 +35,5 @@ deps = [flake8] select = E,W,F -max-line-length=127 +max-line-length = 127 exclude = .tox, *.egg, build, data, .git, .eggs, __pycache__, test/, docs/, build/, dist/, env.py