From 3976d539d21115b75e88d28725b1f90a910eab53 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 24 May 2024 17:00:29 +0100 Subject: [PATCH] Add options from Scientific Python --- .github/workflows/test.yaml | 6 ++++++ pyproject.toml | 28 +++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a632bf4..736402e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,6 +7,12 @@ on: - main - renovate/** pull_request: + workflow_dispatch: + +concurrency: + cancel-in-progress: true + group: >- + ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} jobs: test: diff --git a/pyproject.toml b/pyproject.toml index 3fb4bd5..ce606ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,21 +70,39 @@ paths.source = [ ] [tool.mypy] +enable_error_code = [ + "ignore-without-code", + "redundant-expr", + "truthy-bool", +] strict = true +warn_unreachable = true [tool.pytest.ini_options] -addopts = """ - --color=yes - --import-mode=importlib - --verbose -""" +addopts = [ + "--color=yes", + "--import-mode=importlib", + "--strict-config", + "--strict-markers", + "--verbose", + "-ra", +] +filterwarnings = [ + "error", +] +log_cli_level = "INFO" +minversion = 6 testpaths = [ "tests", ] +xfail_strict = true [tool.ruff] fix = true force-exclude = true +src = [ + "src", +] lint.ignore = [ "COM812", "D203",