Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ruff from 0.5.5 to 0.6.2 #1300

Merged
merged 2 commits into from
Aug 28, 2024
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
38 changes: 19 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def mocked_responses() -> Generator[aioresponses, None, None]:
yield m


@pytest.fixture()
@pytest.fixture
def cli_runner(monkeypatch: MonkeyPatch, tmpdir: pathlib.Path) -> CliRunner:
"""Fixture for invoking command-line interfaces."""
runner = CliRunner()
Expand Down
8 changes: 4 additions & 4 deletions tests/gigya/test_gigya.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from renault_api import gigya


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_login(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand All @@ -32,7 +32,7 @@ async def test_login(
assert response.get_session_cookie() == TEST_LOGIN_TOKEN


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_login_error(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand All @@ -49,7 +49,7 @@ async def test_login_error(
)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_person_id(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand All @@ -65,7 +65,7 @@ async def test_person_id(
assert response.get_person_id() == TEST_PERSON_ID


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_jwt_token(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand Down
10 changes: 5 additions & 5 deletions tests/kamereon/test_kamereon.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from renault_api.kamereon import exceptions


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_person(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand All @@ -37,7 +37,7 @@ async def test_get_person(
assert len(person.accounts) == 2


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_account_vehicles(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand All @@ -54,7 +54,7 @@ async def test_get_account_vehicles(
)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_vehicle_data(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand All @@ -73,7 +73,7 @@ async def test_get_vehicle_data(
)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_vehicle_data_xml_bad_gateway(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand All @@ -98,7 +98,7 @@ async def test_get_vehicle_data_xml_bad_gateway(
)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_set_vehicle_action(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand Down
10 changes: 5 additions & 5 deletions tests/test_api_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from renault_api.helpers import get_api_keys


@pytest.mark.asyncio()
@pytest.mark.asyncio
@pytest.mark.parametrize("locale", AVAILABLE_LOCALES.keys())
async def test_available_locales(locale: str) -> None:
"""Ensure all items AVAILABLE_LOCALES have correct data."""
Expand All @@ -31,7 +31,7 @@ async def test_available_locales(locale: str) -> None:
assert api_keys[key]


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_missing_aiohttp_session() -> None:
"""Ensure failure to unknown locale if aiohttp_session is not set."""
locale = "invalid"
Expand All @@ -41,7 +41,7 @@ async def test_missing_aiohttp_session() -> None:
assert "aiohttp_session is not set." in str(excinfo)


@pytest.mark.asyncio()
@pytest.mark.asyncio
@pytest.mark.parametrize("locale", AVAILABLE_LOCALES.keys())
@pytest.mark.skip(reason="Makes real calls to Renault servers")
async def test_preload_force_api_keys(websession: ClientSession, locale: str) -> None:
Expand All @@ -53,7 +53,7 @@ async def test_preload_force_api_keys(websession: ClientSession, locale: str) ->
assert api_keys == expected_api_keys


@pytest.mark.asyncio()
@pytest.mark.asyncio
@pytest.mark.skip("API keys are out of date.")
async def test_preload_unknown_api_keys(
websession: ClientSession, mocked_responses: aioresponses
Expand All @@ -73,7 +73,7 @@ async def test_preload_unknown_api_keys(
assert api_keys == expected_api_keys


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_preload_invalid_api_keys(
websession: ClientSession, mocked_responses: aioresponses
) -> None:
Expand Down
8 changes: 4 additions & 4 deletions tests/test_renault_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from renault_api.renault_account import RenaultAccount


@pytest.fixture()
@pytest.fixture
def account(websession: aiohttp.ClientSession) -> RenaultAccount:
"""Fixture for testing RenaultAccount."""
return RenaultAccount(
Expand All @@ -40,7 +40,7 @@ def tests_init(websession: aiohttp.ClientSession) -> None:
)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_vehicles(
account: RenaultAccount, mocked_responses: aioresponses
) -> None:
Expand All @@ -49,7 +49,7 @@ async def test_get_vehicles(
await account.get_vehicles()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_api_vehicles(
account: RenaultAccount, mocked_responses: aioresponses
) -> None:
Expand All @@ -58,7 +58,7 @@ async def test_get_api_vehicles(
await account.get_api_vehicles()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_api_vehicle(account: RenaultAccount) -> None:
"""Test get_api_vehicle."""
vehicle = await account.get_api_vehicle(TEST_VIN)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_renault_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from renault_api.renault_client import RenaultClient


@pytest.fixture()
@pytest.fixture
def client(websession: aiohttp.ClientSession) -> RenaultClient:
"""Fixture for testing RenaultClient."""
return RenaultClient(
Expand All @@ -36,7 +36,7 @@ def test_init(websession: aiohttp.ClientSession) -> None:
)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_person(
client: RenaultClient, mocked_responses: aioresponses
) -> None:
Expand All @@ -47,7 +47,7 @@ async def test_get_person(
assert len(person.accounts) == 2


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_api_accounts(
client: RenaultClient, mocked_responses: aioresponses
) -> None:
Expand All @@ -57,7 +57,7 @@ async def test_get_api_accounts(
assert len(accounts) == 2


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_get_api_account(client: RenaultClient) -> None:
"""Test get_api_account."""
account = await client.get_api_account(TEST_ACCOUNT_ID)
Expand Down
18 changes: 9 additions & 9 deletions tests/test_renault_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_logged_in_session(websession: aiohttp.ClientSession) -> RenaultSession:
)


@pytest.fixture()
@pytest.fixture
def session(websession: aiohttp.ClientSession) -> RenaultSession:
"""Fixture for testing RenaultSession."""
return RenaultSession(
Expand All @@ -45,7 +45,7 @@ def session(websession: aiohttp.ClientSession) -> RenaultSession:
)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_init_locale_only(websession: aiohttp.ClientSession) -> None:
"""Test initialisation with locale only."""
session = RenaultSession(
Expand All @@ -59,7 +59,7 @@ async def test_init_locale_only(websession: aiohttp.ClientSession) -> None:
assert await session._get_kamereon_root_url()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_init_country_only(websession: aiohttp.ClientSession) -> None:
"""Test initialisation with country only."""
session = RenaultSession(
Expand Down Expand Up @@ -89,7 +89,7 @@ async def test_init_country_only(websession: aiohttp.ClientSession) -> None:
assert await session._get_kamereon_root_url()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_init_locale_details_only(websession: aiohttp.ClientSession) -> None:
"""Test initialisation with locale_details only."""
session = RenaultSession(
Expand All @@ -107,7 +107,7 @@ async def test_init_locale_details_only(websession: aiohttp.ClientSession) -> No
assert await session._get_kamereon_root_url()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_init_locale_and_details(websession: aiohttp.ClientSession) -> None:
"""Test initialisation with locale and locale_details."""
session = RenaultSession(
Expand All @@ -122,7 +122,7 @@ async def test_init_locale_and_details(websession: aiohttp.ClientSession) -> Non
assert await session._get_kamereon_root_url()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_init_locale_country(websession: aiohttp.ClientSession) -> None:
"""Test initialisation with locale and country."""
session = RenaultSession(
Expand All @@ -137,7 +137,7 @@ async def test_init_locale_country(websession: aiohttp.ClientSession) -> None:
assert await session._get_kamereon_root_url()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_not_logged_in(session: RenaultSession) -> None:
"""Test errors when not logged in."""
with pytest.raises(
Expand All @@ -159,7 +159,7 @@ async def test_not_logged_in(session: RenaultSession) -> None:
await session._get_jwt()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_login(session: RenaultSession, mocked_responses: aioresponses) -> None:
"""Test login/person/jwt response."""
fixtures.inject_gigya_all(mocked_responses)
Expand All @@ -180,7 +180,7 @@ async def test_login(session: RenaultSession, mocked_responses: aioresponses) ->
assert len(mocked_responses.requests) == 3


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_expired_login_token(
websession: aiohttp.ClientSession, mocked_responses: aioresponses
) -> None:
Expand Down
Loading
Loading