From 2aa7e14b6b3876820da7f7d7b93a60affe1add1f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:15:18 +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/astral-sh/ruff-pre-commit: v0.8.2 → v0.9.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.2...v0.9.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aa34ef7..dc7cf95 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.2 + rev: v0.9.2 hooks: - id: ruff args: [ "--select", "I", "--fix" ] From ad11fbf26f4877b7301e7d88215f5f727c2dc0ff Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:15:24 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 2 +- src/adtl/parser.py | 2 +- tests/test_autoparser/test_utils.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0b66f8a..d46bcc9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,7 @@ ] templates_path = ["_templates"] -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "venv" "README.md"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "venvREADME.md"] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output diff --git a/src/adtl/parser.py b/src/adtl/parser.py index 8f3a668..abad1ff 100644 --- a/src/adtl/parser.py +++ b/src/adtl/parser.py @@ -985,7 +985,7 @@ def show_report(self): print( f"|{table:14s}\t|{self.report['total_valid'][table]}\t" f"|{self.report['total'][table]}\t" - f"|{self.report['total_valid'][table]/self.report['total'][table]:%} |" # noqa:E501 + f"|{self.report['total_valid'][table] / self.report['total'][table]:%} |" # noqa:E501 ) print() for table in self.report["validation_errors"]: diff --git a/tests/test_autoparser/test_utils.py b/tests/test_autoparser/test_utils.py index 55ddd02..5f5bab8 100644 --- a/tests/test_autoparser/test_utils.py +++ b/tests/test_autoparser/test_utils.py @@ -50,11 +50,11 @@ def test_read_config_schema(): "s, expected", [ ("oui=True, non=False, blah=None", {"oui": True, "non": False, "blah": ""}), - ("vivant=alive, décédé=dead, " "=None", {"vivant": "alive", "décédé": "dead"}), + ("vivant=alive, décédé=dead, =None", {"vivant": "alive", "décédé": "dead"}), ({2: True}, None), - ("" " = " ", poisson=fish", {"poisson": "fish"}), + (" = , poisson=fish", {"poisson": "fish"}), ( - "" "=None, ecouvillon+croûte=[swab, crust], ecouvillon=[swab]", + "=None, ecouvillon+croûte=[swab, crust], ecouvillon=[swab]", {"ecouvillon+croûte": ["swab", "crust"], "ecouvillon": ["swab"]}, ), ("pos=Y, neg=N", {"pos": "Y", "neg": "N"}),