diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index a65de46..c406594 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -53,8 +53,10 @@ jobs: uses: codecov/test-results-action@v1 with: env_vars: PYTHON_VERSION,PYDANTIC_VERSION + use_oidc: true - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: - env_vars: PYTHON_VERSION,PYDANTIC_VERSION \ No newline at end of file + env_vars: PYTHON_VERSION,PYDANTIC_VERSION + use_oidc: true \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9f32ddf..10961a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,6 +64,13 @@ test = "uv run pytest --cov=src --cov-report xml --junitxml=./junit.xml -n auto" bump = "uv run bump-my-version bump" show-bump = "uv run bump-my-version show-bump" +[tool.coverage.report] +exclude_lines = [ + "raise NotImplementedError", + "if TYPE_CHECKING:", + "@overload", + "except ImportError:", +] [tool.ruff] line-length = 120 diff --git a/tests/plugin_test.py b/tests/plugin_test.py index d359a58..6486689 100644 --- a/tests/plugin_test.py +++ b/tests/plugin_test.py @@ -11,7 +11,7 @@ async def test_pip(app: App): event = fake_group_message_event_v11(message="pip install nonebot2") try: - from nonebot_plugin_template import pip + from nonebot_plugin_template import pip # type:ignore except ImportError: pytest.skip("nonebot_plugin_template.pip not found")