Skip to content

Commit 9cda60b

Browse files
Use flake8-pytest-style plugin in auto-linters
1 parent e559ef8 commit 9cda60b

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ jobs:
4141
python-version: "3.12"
4242
- name: Install and run linter
4343
run: |
44-
pip install flake8==7.1.0 flake8-bugbear
44+
pip install flake8==7.1.0 flake8-bugbear flake8-pytest-style
4545
flake8

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ repos:
1818
- id: flake8
1919
additional_dependencies:
2020
- flake8-bugbear==24.2.6
21+
- flake8-pytest-style==2.0.0
2122
- repo: https://github.com/psf/black
2223
rev: 22.10.0
2324
hooks:

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ black==24.*
22
isort==5.*
33
flake8==7.*
44
flake8-bugbear==24.*
5-
flake8-pytest-style==1.*
5+
flake8-pytest-style==2.*
66
pytest==8.*
77
.

tests/integration/test_manager.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ def raise_for_status():
1818

1919

2020
@pytest.fixture
21-
def mock_response_hourly(monkeypatch):
21+
def _mock_response_hourly(monkeypatch):
2222
def mock_get(*args, **kwargs):
2323
return MockResponseHourly()
2424

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

2727

2828
@pytest.fixture
29-
def hourly_forecast(mock_response_hourly):
29+
def hourly_forecast(_mock_response_hourly):
3030
m = Manager(api_key="aaaaaaaaaaaaaaaaaaaaaaaaa")
3131
f = m.get_forecast(50.9992, 0.0154, frequency="hourly", convert_weather_code=True)
3232
return f
@@ -50,15 +50,15 @@ def raise_for_status():
5050

5151

5252
@pytest.fixture
53-
def mock_response_three_hourly(monkeypatch):
53+
def _mock_response_three_hourly(monkeypatch):
5454
def mock_get(*args, **kwargs):
5555
return MockResponseThreeHourly()
5656

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

5959

6060
@pytest.fixture
61-
def three_hourly_forecast(mock_response_three_hourly):
61+
def three_hourly_forecast(_mock_response_three_hourly):
6262
m = Manager(api_key="aaaaaaaaaaaaaaaaaaaaaaaaa")
6363
f = m.get_forecast(
6464
50.9992, 0.0154, frequency="three-hourly", convert_weather_code=True
@@ -84,15 +84,15 @@ def raise_for_status():
8484

8585

8686
@pytest.fixture
87-
def mock_response_daily(monkeypatch):
87+
def _mock_response_daily(monkeypatch):
8888
def mock_get(*args, **kwargs):
8989
return MockResponseDaily()
9090

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

9393

9494
@pytest.fixture
95-
def daily_forecast(mock_response_daily):
95+
def daily_forecast(_mock_response_daily):
9696
m = Manager(api_key="aaaaaaaaaaaaaaaaaaaaaaaaa")
9797
f = m.get_forecast(50.9992, 0.0154, frequency="daily", convert_weather_code=True)
9898
return f

0 commit comments

Comments
 (0)