From 1f18d2742e387debdae1e6d71589066f7f090f56 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 31 Jul 2022 01:06:28 +0200 Subject: [PATCH] Python reformattings not catched in https://github.com/TUM-Dev/navigatum/commit/19f924068a90b4c09f29b4f306afca9bd32a41c7 * added python requirements to the requirements file * fixed one formatting issue * removed one legacy ignored error (error no longer exists) --- data/requirements.txt | 5 +++-- pyproject.toml | 1 - requirements_dev.txt | 7 ++++--- server/test/requirements.txt | 2 ++ server/test/search_test.py | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 server/test/requirements.txt diff --git a/data/requirements.txt b/data/requirements.txt index 1de185ca9..a7580056f 100644 --- a/data/requirements.txt +++ b/data/requirements.txt @@ -1,4 +1,5 @@ +beautifulsoup4~=4.11.1 +defusedxml~=0.7.1 +Pillow~=9.2.0 pyyaml~=6.0 utm~=0.7.0 -Pillow~=9.2.0 -defusedxml~=0.7.1 diff --git a/pyproject.toml b/pyproject.toml index 3a402dd80..759f456a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,5 @@ disable=[ "line-too-long", # we have another hook for this "wrong-import-position", # we have another hook for this "no-member", # mypy does this job with less false positives - "modelform-uses-exclude", # usage of exclude is sometimes valid. "fixme", # prevents users from committing things with a TODO in comments. Having more frequent commits is desirable ] diff --git a/requirements_dev.txt b/requirements_dev.txt index 1b7395b18..96f814d83 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,6 +1,7 @@ mypy~=0.950 -pre-commit~=2.19.0 -types-Pillow~=9.0.19 +pre-commit~=2.20.0 +pylint~=2.14.5 +types-Pillow~=9.2.1 types-PyYAML~=6.0.8 -types-requests~=2.27.30 +types-requests~=2.28.6 types-termcolor~=1.1.4 diff --git a/server/test/requirements.txt b/server/test/requirements.txt new file mode 100644 index 000000000..4992eb6db --- /dev/null +++ b/server/test/requirements.txt @@ -0,0 +1,2 @@ +progress~=1.6 +termcolor~=1.1.0 diff --git a/server/test/search_test.py b/server/test/search_test.py index ea3f1f761..4603ddc91 100644 --- a/server/test/search_test.py +++ b/server/test/search_test.py @@ -19,7 +19,7 @@ def _do_search(qst: str, query: dict): "query": query["query"], "target": query["target"], "hits": list(itertools.chain(*[s["entries"] for s in req["sections"]])), - "num_results": sum([s["estimatedTotalHits"] for s in req["sections"]]), + "num_results": sum(s["estimatedTotalHits"] for s in req["sections"]), "time_ms": req["time_ms"], }