Skip to content

Commit

Permalink
Fix: Update test_plugin.py type checking and CI workflow
Browse files Browse the repository at this point in the history
Co-Authored-By: ned.twigg@diffplug.com <ned.twigg@diffplug.com>
  • Loading branch information
devin-ai-integration[bot] and nedtwigg committed Dec 11, 2024
1 parent b40233f commit ac0ccbc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
else
. ../../.venv/bin/activate
fi
uv pip install .
uv pip install -e .
uv pip install -r requirements.txt -r dev-requirements.txt
- name: pytest-selfie - pytest
Expand Down Expand Up @@ -137,6 +137,7 @@ jobs:
else
. ../../.venv/bin/activate
fi
uv pip install -e .
uv pip install -r requirements.txt -r dev-requirements.txt
- name: example-pytest-selfie - pytest
Expand Down
9 changes: 5 additions & 4 deletions python/pytest-selfie/tests/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import os
import pytest
from _pytest.config import Config
from pathlib import Path
from typing import Any

from pytest_selfie.plugin import PytestSnapshotSystem, SelfieSettingsAPI
import pytest
from _pytest.config import Config
from selfie_lib import Mode, TypedPath

from pytest_selfie.plugin import PytestSnapshotSystem, SelfieSettingsAPI


class MockConfig(Config): # type: ignore
def __init__(self, tmp_path: Path):
self._rootpath = tmp_path

def getoption(self, name: str, default: Any = None, skip: bool = False) -> Any:
def getoption(self, name: str, default: Any = None, skip: bool = False) -> Any: # type: ignore[override]
return default

@property
Expand Down

0 comments on commit ac0ccbc

Please sign in to comment.