diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 8d1d3cc..e4e4ea3 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -41,5 +41,5 @@ jobs: python-version: "3.12" - name: Install and run linter run: | - pip install flake8==7.1.0 flake8-bugbear + pip install flake8==7.1.0 flake8-bugbear flake8-pytest-style flake8 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4092262..4d57be7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,7 @@ repos: - id: flake8 additional_dependencies: - flake8-bugbear==24.2.6 + - flake8-pytest-style==2.0.0 - repo: https://github.com/psf/black rev: 22.10.0 hooks: diff --git a/requirements-dev.txt b/requirements-dev.txt index 3061c53..7753214 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,6 +2,6 @@ black==24.* isort==5.* flake8==7.* flake8-bugbear==24.* -flake8-pytest-style==1.* +flake8-pytest-style==2.* pytest==8.* . diff --git a/tests/integration/test_manager.py b/tests/integration/test_manager.py index 625d7cf..27b7e70 100644 --- a/tests/integration/test_manager.py +++ b/tests/integration/test_manager.py @@ -18,7 +18,7 @@ def raise_for_status(): @pytest.fixture -def mock_response_hourly(monkeypatch): +def _mock_response_hourly(monkeypatch): def mock_get(*args, **kwargs): return MockResponseHourly() @@ -26,7 +26,7 @@ def mock_get(*args, **kwargs): @pytest.fixture -def hourly_forecast(mock_response_hourly): +def hourly_forecast(_mock_response_hourly): m = Manager(api_key="aaaaaaaaaaaaaaaaaaaaaaaaa") f = m.get_forecast(50.9992, 0.0154, frequency="hourly", convert_weather_code=True) return f @@ -50,7 +50,7 @@ def raise_for_status(): @pytest.fixture -def mock_response_three_hourly(monkeypatch): +def _mock_response_three_hourly(monkeypatch): def mock_get(*args, **kwargs): return MockResponseThreeHourly() @@ -58,7 +58,7 @@ def mock_get(*args, **kwargs): @pytest.fixture -def three_hourly_forecast(mock_response_three_hourly): +def three_hourly_forecast(_mock_response_three_hourly): m = Manager(api_key="aaaaaaaaaaaaaaaaaaaaaaaaa") f = m.get_forecast( 50.9992, 0.0154, frequency="three-hourly", convert_weather_code=True @@ -84,7 +84,7 @@ def raise_for_status(): @pytest.fixture -def mock_response_daily(monkeypatch): +def _mock_response_daily(monkeypatch): def mock_get(*args, **kwargs): return MockResponseDaily() @@ -92,7 +92,7 @@ def mock_get(*args, **kwargs): @pytest.fixture -def daily_forecast(mock_response_daily): +def daily_forecast(_mock_response_daily): m = Manager(api_key="aaaaaaaaaaaaaaaaaaaaaaaaa") f = m.get_forecast(50.9992, 0.0154, frequency="daily", convert_weather_code=True) return f