From da312bfbfc147e6f299afd96748f16473637a2bb Mon Sep 17 00:00:00 2001 From: phi Date: Sat, 14 Sep 2024 02:47:35 +0900 Subject: [PATCH] fix: mv tests -> src/tests --- pyproject.toml | 6 +++--- pyrightconfig.json | 9 +++++++-- ruff.toml | 2 +- {tests => src/tests}/__init__.py | 0 {tests => src/tests}/conftest.py | 0 {tests => src/tests}/test_executor.py | 0 {tests => src/tests}/test_serde.py | 3 --- 7 files changed, 11 insertions(+), 9 deletions(-) rename {tests => src/tests}/__init__.py (100%) rename {tests => src/tests}/conftest.py (100%) rename {tests => src/tests}/test_executor.py (100%) rename {tests => src/tests}/test_serde.py (81%) diff --git a/pyproject.toml b/pyproject.toml index 67de46b..5ac850f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,9 +51,9 @@ dev-dependencies = [ ] [tool.poe.tasks] -lint = ["lint:check", "lint:format"] -"lint:check" = "ruff check src tests --fix" -"lint:format" = "ruff format src tests" +lint = ["_lint:check", "_lint:format"] +"_lint:check" = "ruff check src --fix" +"_lint:format" = "ruff format src" check = "pre-commit run --all-files --show-diff-on-failure" [build-system] diff --git a/pyrightconfig.json b/pyrightconfig.json index 9b720f4..2af5788 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -18,6 +18,11 @@ "reportPrivateUsage": false, "reportUnnecessaryTypeIgnoreComment": true, "reportImplicitOverride": true, - "venv": ".venv", - "venvPath": "." + "executionEnvironments": [ + { + "root": "src/tests", + "reportUnknownParameterType": false, + "reportMissingParameterType": false, + } + ] } \ No newline at end of file diff --git a/ruff.toml b/ruff.toml index 27834bf..4ba70ca 100644 --- a/ruff.toml +++ b/ruff.toml @@ -92,7 +92,7 @@ ignore = [ ] [lint.per-file-ignores] -"./tests/**/*.py" = [ +"./src/tests/**/*.py" = [ "TCH001", "TCH002", "TCH003", diff --git a/tests/__init__.py b/src/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to src/tests/__init__.py diff --git a/tests/conftest.py b/src/tests/conftest.py similarity index 100% rename from tests/conftest.py rename to src/tests/conftest.py diff --git a/tests/test_executor.py b/src/tests/test_executor.py similarity index 100% rename from tests/test_executor.py rename to src/tests/test_executor.py diff --git a/tests/test_serde.py b/src/tests/test_serde.py similarity index 81% rename from tests/test_serde.py rename to src/tests/test_serde.py index ea84da5..0d2002b 100644 --- a/tests/test_serde.py +++ b/src/tests/test_serde.py @@ -1,6 +1,3 @@ -# pyright: reportUnknownParameterType=false -# pyright: reportMissingParameterType=false -# pyright: reportImplicitOverride=false from __future__ import annotations from typing import Any