Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ black==24.*
isort==5.*
flake8==7.*
flake8-bugbear==24.*
flake8-pytest-style==1.*
flake8-pytest-style==2.*
pytest==8.*
.
12 changes: 6 additions & 6 deletions tests/integration/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def raise_for_status():


@pytest.fixture
def mock_response_hourly(monkeypatch):
def _mock_response_hourly(monkeypatch):
def mock_get(*args, **kwargs):
return MockResponseHourly()

monkeypatch.setattr(requests.Session, "get", mock_get)


@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
Expand All @@ -50,15 +50,15 @@ 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()

monkeypatch.setattr(requests.Session, "get", mock_get)


@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
Expand All @@ -84,15 +84,15 @@ def raise_for_status():


@pytest.fixture
def mock_response_daily(monkeypatch):
def _mock_response_daily(monkeypatch):
def mock_get(*args, **kwargs):
return MockResponseDaily()

monkeypatch.setattr(requests.Session, "get", mock_get)


@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
Expand Down
Loading