Skip to content

Commit

Permalink
Bump ruff from 0.5.7 to 0.6.1 (#81)
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] <[email protected]>

* Fix lint errors

* Bump ruff pre-commit hook

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maciej Bieniek <[email protected]>
  • Loading branch information
dependabot[bot] and bieniu authored Aug 19, 2024
1 parent 5a9362f commit 7068c31
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
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 @@ -7,5 +7,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
10 changes: 5 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
from syrupy.location import PyTestLocation


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


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


@pytest.fixture()
@pytest.fixture
def hydrological_stations() -> list[dict[str, Any]]:
"""Return hydrological stations data from the fixture file."""
with Path.open(
Expand All @@ -33,7 +33,7 @@ def hydrological_stations() -> list[dict[str, Any]]:
return cast(list[dict[str, Any]], json.load(file))


@pytest.fixture()
@pytest.fixture
def hydrological_details() -> dict[str, Any]:
"""Return hydrological details from the fixture file."""
with Path.open(
Expand All @@ -42,7 +42,7 @@ def hydrological_details() -> dict[str, Any]:
return cast(dict[str, Any], json.load(file))


@pytest.fixture()
@pytest.fixture
def snapshot(snapshot: SnapshotAssertion) -> SnapshotAssertion:
"""Return snapshot assertion fixture."""
return snapshot.use_extension(SnapshotExtension)
Expand Down
34 changes: 17 additions & 17 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
TEST_TIME = datetime(2024, 4, 22, 11, 10, 32, tzinfo=UTC)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_weather_stations(
snapshot: SnapshotAssertion, weather_stations: list[dict[str, Any]]
) -> None:
Expand All @@ -45,7 +45,7 @@ async def test_weather_stations(
assert imgwpib.weather_stations == snapshot


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_weather_station(
snapshot: SnapshotAssertion,
weather_stations: list[dict[str, Any]],
Expand All @@ -66,7 +66,7 @@ async def test_weather_station(
assert weather_data == snapshot


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_wrong_weather_station_id(weather_stations: list[dict[str, Any]]) -> None:
"""Test wrong weather station ID."""
session = aiohttp.ClientSession()
Expand All @@ -82,7 +82,7 @@ async def test_wrong_weather_station_id(weather_stations: list[dict[str, Any]])
assert str(exc_info.value) == "Invalid weather station ID: abcd1234"


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_hydrological_stations(
snapshot: SnapshotAssertion, hydrological_stations: list[dict[str, Any]]
) -> None:
Expand All @@ -103,7 +103,7 @@ async def test_hydrological_stations(
assert imgwpib.hydrological_stations == snapshot


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_hydrological_station(
snapshot: SnapshotAssertion,
hydrological_stations: list[dict[str, Any]],
Expand All @@ -130,7 +130,7 @@ async def test_hydrological_station(
assert hydrological_data == snapshot


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_wrong_weather_hydrological_id(
hydrological_stations: list[dict[str, Any]],
) -> None:
Expand All @@ -148,7 +148,7 @@ async def test_wrong_weather_hydrological_id(
assert str(exc_info.value) == "Invalid hydrological station ID: abcd1234"


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_api_error() -> None:
"""Test API error."""
session = aiohttp.ClientSession()
Expand All @@ -168,7 +168,7 @@ async def test_api_error() -> None:
assert str(exc.value) == "Invalid response: 400"


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_weather_data_without_station_id() -> None:
"""Test get_weather_data() without station ID."""
session = aiohttp.ClientSession()
Expand All @@ -183,7 +183,7 @@ async def test_get_weather_data_without_station_id() -> None:
assert str(exc.value) == "Weather station ID is not set"


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_hydrological_data_without_station_id() -> None:
"""Test get_hydrological_data() without station ID."""
session = aiohttp.ClientSession()
Expand All @@ -198,7 +198,7 @@ async def test_get_hydrological_data_without_station_id() -> None:
assert str(exc.value) == "Hydrological station ID is not set"


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_invalid_water_level_value(
hydrological_stations: list[dict[str, Any]],
hydrological_details: dict[str, Any],
Expand Down Expand Up @@ -229,7 +229,7 @@ async def test_invalid_water_level_value(


@pytest.mark.parametrize("date_time", [None, "lorem ipsum"])
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_invalid_date(
hydrological_stations: list[dict[str, Any]],
hydrological_details: dict[str, Any],
Expand Down Expand Up @@ -262,7 +262,7 @@ async def test_invalid_date(
("water_level", "flood_warning_level", "expected"),
[(100.0, 200.0, False), (100.0, 100.0, True), (100.0, 50.0, True)],
)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_flood_warning(
hydrological_stations: list[dict[str, Any]],
hydrological_details: dict[str, Any],
Expand Down Expand Up @@ -298,7 +298,7 @@ async def test_flood_warning(
("water_level", "flood_alarm_level", "expected"),
[(100.0, 200.0, False), (100.0, 100.0, True), (100.0, 50.0, True)],
)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_flood_alarm(
hydrological_stations: list[dict[str, Any]],
hydrological_details: dict[str, Any],
Expand Down Expand Up @@ -330,7 +330,7 @@ async def test_flood_alarm(
assert result.flood_alarm == expected


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_water_temperature_not_current(
hydrological_stations: list[dict[str, Any]],
hydrological_details: dict[str, Any],
Expand Down Expand Up @@ -362,7 +362,7 @@ async def test_water_temperature_not_current(
assert result.water_temperature_measurement_date is None


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_hydrological_data_invalid_content(
hydrological_stations: list[dict[str, Any]],
hydrological_details: dict[str, Any],
Expand All @@ -389,7 +389,7 @@ async def test_hydrological_data_invalid_content(
assert str(exc_info.value) == "Invalid content type: text/html"


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_no_hydrological_data(
hydrological_stations: list[dict[str, Any]],
hydrological_details: dict[str, Any],
Expand Down Expand Up @@ -419,7 +419,7 @@ async def test_no_hydrological_data(
assert str(exc_info.value) == "No hydrological data for station ID: 154190050"


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_hydrological_details_is_null(
hydrological_stations: list[dict[str, Any]],
) -> None:
Expand Down

0 comments on commit 7068c31

Please sign in to comment.