Skip to content

Commit

Permalink
Bump ruff from 0.5.7 to 0.6.1 (#400)
Browse files Browse the repository at this point in the history
* Bump ruff from 0.5.7 to 0.6.1

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.7 to 0.6.1.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.5.7...0.6.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix lint errors

* Update schedule

* Bump ruff pre-commit hook

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and bieniu authored Aug 19, 2024
1 parent c692e87 commit 1043ed0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Pre-commit auto-update
on:
schedule:
# Run on fridays
- cron: "0 0 * * 5"
- cron: "0 0 * * 1"

jobs:
auto-update:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.0
rev: v0.6.1
hooks:
- id: ruff
args:
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pytest-cov==5.0.0
pytest-error-for-skips==2.0.2
pytest-timeout==2.3.1
pytest==8.3.2
ruff==0.5.7
ruff==0.6.1
syrupy==4.6.1
22 changes: 11 additions & 11 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,77 +10,77 @@
from syrupy.location import PyTestLocation


@pytest.fixture()
@pytest.fixture
def stations() -> list[dict[str, Any]]:
"""Return stations data from the fixture file."""
with open("tests/fixtures/stations.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def station() -> list[dict[str, Any]]:
"""Return the station data from the fixture file."""
with open("tests/fixtures/station.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def indexes() -> dict[str, Any]:
"""Return indexes data from the fixture file."""
with open("tests/fixtures/indexes.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def sensor_658() -> dict[str, Any]:
"""Return sensor 658 data from the fixture file."""
with open("tests/fixtures/sensor_658.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def sensor_660() -> dict[str, Any]:
"""Return sensor 660 data from the fixture file."""
with open("tests/fixtures/sensor_660.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def sensor_665() -> dict[str, Any]:
"""Return sensor 665 data from the fixture file."""
with open("tests/fixtures/sensor_665.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def sensor_667() -> dict[str, Any]:
"""Return sensor 667 data from the fixture file."""
with open("tests/fixtures/sensor_667.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def sensor_670() -> dict[str, Any]:
"""Return sensor 670 data from the fixture file."""
with open("tests/fixtures/sensor_670.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def sensor_672() -> dict[str, Any]:
"""Return sensor 672 data from the fixture file."""
with open("tests/fixtures/sensor_672.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def sensor_14395() -> dict[str, Any]:
"""Return sensor 14395 data from the fixture file."""
with open("tests/fixtures/sensor_14395.json", encoding="utf-8") as file:
return json.load(file)


@pytest.fixture()
@pytest.fixture
def snapshot(snapshot: SnapshotAssertion) -> SnapshotAssertion:
"""Return snapshot assertion fixture."""
return snapshot.use_extension(SnapshotExtension)
Expand Down
18 changes: 9 additions & 9 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
VALID_LONGITUDE = 88.88


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_valid_data_first_value(
snapshot: SnapshotAssertion,
stations: list[dict[str, Any]],
Expand Down Expand Up @@ -88,7 +88,7 @@ async def test_valid_data_first_value(
assert data == snapshot


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_api_error() -> None:
"""Test GIOS API error."""
session = aiohttp.ClientSession()
Expand All @@ -108,7 +108,7 @@ async def test_api_error() -> None:
await session.close()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_valid_data_second_value(
snapshot: SnapshotAssertion,
stations: list[dict[str, Any]],
Expand Down Expand Up @@ -187,7 +187,7 @@ async def test_valid_data_second_value(
assert data == snapshot


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_no_indexes_data(
snapshot: SnapshotAssertion,
stations: list[dict[str, Any]],
Expand Down Expand Up @@ -257,7 +257,7 @@ async def test_no_indexes_data(
assert data == snapshot


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_no_sensor_data_1(
stations: list[dict[str, Any]],
station: list[dict[str, Any]],
Expand Down Expand Up @@ -337,7 +337,7 @@ async def test_no_sensor_data_1(
await session.close()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_invalid_sensor_data_2(
stations: list[dict[str, Any]], station: list[dict[str, Any]]
) -> None:
Expand Down Expand Up @@ -389,7 +389,7 @@ async def test_invalid_sensor_data_2(
await session.close()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_no_station_data(stations: list[dict[str, Any]]) -> None:
"""Test with no station data."""
session = aiohttp.ClientSession()
Expand All @@ -411,7 +411,7 @@ async def test_no_station_data(stations: list[dict[str, Any]]) -> None:
await session.close()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_no_stations_data() -> None:
"""Test with no stations data."""
session = aiohttp.ClientSession()
Expand All @@ -429,7 +429,7 @@ async def test_no_stations_data() -> None:
await session.close()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_invalid_station_id(stations: list[dict[str, Any]]) -> None:
"""Test with invalid station_id."""
session = aiohttp.ClientSession()
Expand Down

0 comments on commit 1043ed0

Please sign in to comment.