From 182e95a5c96e2f2e15f5947f31ae96dc44c4e25a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 02:58:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/main.yml | 2 +- src/interrogate/badge_gen.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b50ee01..c948b45 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,7 +50,7 @@ jobs: python -Im pip install --upgrade tox - name: Run tox targets for ${{ matrix.python-version }} run: python -Im tox run -f py$(echo ${{ matrix.python-version }} | tr -d .) - + - name: Run mypy run: python -Im tox run -e mypy if: matrix.python-version == '3.11' diff --git a/src/interrogate/badge_gen.py b/src/interrogate/badge_gen.py index d2c42c5..6b18518 100644 --- a/src/interrogate/badge_gen.py +++ b/src/interrogate/badge_gen.py @@ -45,7 +45,9 @@ # depending on the character length of the result (e.g. 100, 99.9, 9.9) # a few values in the svg template need to adjust so it's readable. # Tuple of values: (svg_width, rect_width, text_x, text_length) -SVG_WIDTH_VALUES: dict[str, dict[str, tuple[int, int, NumberType, NumberType]]] = { +SVG_WIDTH_VALUES: dict[ + str, dict[str, tuple[int, int, NumberType, NumberType]] +] = { # integer "100": { "plastic": (135, 43, 1140, 330), @@ -123,7 +125,9 @@ def save_badge( return output -def _get_badge_measurements(result: float, style: str) -> dict[str, NumberType]: +def _get_badge_measurements( + result: float, style: str +) -> dict[str, NumberType]: """Lookup templated style values based on result number.""" if result == 100: width_values = SVG_WIDTH_VALUES["100"]