Skip to content
Draft
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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typing:
for lib in $(LIBRARIES); do \
cd ${WORKDIR}/$$lib && \
poetry run mypy --version && \
poetry run mypy --install-types --non-interactive --strict $$(echo $$lib | tr "-" "_") && \
poetry run mypy --install-types --non-interactive --strict --no-warn-unused-ignores $$(echo $$lib | tr "-" "_") && \
poetry run ty version && \
poetry run ty check && \
poetry run pyrefly --version && \
Expand Down
2 changes: 1 addition & 1 deletion scaleway/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ invalid-assignment = "ignore"
invalid-argument-type = "ignore"
missing-argument = "ignore"
unresolved-reference = "ignore"
possibly-unbound-attribute = "ignore"
unused-ignore-comment = "ignore"
5 changes: 2 additions & 3 deletions scaleway/scaleway/applesilicon/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,9 +1104,8 @@ def wait_for_server_private_network(
options = WaitForOptions()

if not options.stop:
options.stop = (
lambda res: res.status
not in SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES
options.stop = lambda res: (
res.status not in SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES
)

return wait_for_resource(
Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/dedibox/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1350,8 +1350,8 @@ def wait_for_server_install(
options = WaitForOptions()

if not options.stop:
options.stop = (
lambda res: res.status not in SERVER_INSTALL_TRANSIENT_STATUSES
options.stop = lambda res: (
res.status not in SERVER_INSTALL_TRANSIENT_STATUSES
)

return wait_for_resource(
Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/instance/v1/custom_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def set_all_server_user_data(
server_id: str,
user_data: Dict[str, bytes],
zone: Optional[ScwZone] = None,
) -> Optional[None]:
) -> None:
param_zone = validate_path_param("zone", zone or self.client.default_zone)
param_server_id = validate_path_param("server_id", server_id)

Expand All @@ -134,7 +134,7 @@ def set_all_server_user_data(
content=user_data[key],
)

return None
return

def wait_instance_server(self, server_id: str, zone: ScwZone) -> GetServerResponse:
wait_interval = interval
Expand Down
12 changes: 8 additions & 4 deletions scaleway/scaleway/instance/v1/test_user_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ def test_set_and_get_server_user_data(self) -> None:
key = "first key"
content = b"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10"
self.instance_api.set_server_user_data(
server_id=self.server.server.id, key=key, content=content
server_id=self.server.server.id, # type: ignore[possibly-missing-attribute]
key=key,
content=content,
)
user_data = self.instance_api.get_server_user_data(
server_id=self.server.server.id, key=key
server_id=self.server.server.id, # type: ignore[possibly-missing-attribute]
key=key,
)
self.assertIsNotNone(user_data)

Expand All @@ -56,9 +59,10 @@ def test_set_and_get_all_user_data(self) -> None:
key: content,
}
self.instance_api.set_all_server_user_data(
server_id=self.server.server.id, user_data=user_data
server_id=self.server.server.id, # type: ignore[possibly-missing-attribute]
user_data=user_data,
)
response = self.instance_api.get_all_server_user_data(
server_id=self.server.server.id
server_id=self.server.server.id # type: ignore[possibly-missing-attribute]
)
self.assertIsNotNone(response)
4 changes: 2 additions & 2 deletions scaleway/scaleway/interlink/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def wait_for_dedicated_connection(
options = WaitForOptions()

if not options.stop:
options.stop = (
lambda res: res.status not in DEDICATED_CONNECTION_TRANSIENT_STATUSES
options.stop = lambda res: (
res.status not in DEDICATED_CONNECTION_TRANSIENT_STATUSES
)

return wait_for_resource(
Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/mongodb/v1/custom_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import datetime, timezone
from typing import Any, Optional

from scaleway.mongodb.v1.api import MongodbV1API # type: ignore[import-untyped]
from scaleway.mongodb.v1.api import MongodbV1API


def _ensure_tzaware_utc(value: Optional[datetime]) -> Optional[datetime]:
Expand All @@ -14,7 +14,7 @@ def _ensure_tzaware_utc(value: Optional[datetime]) -> Optional[datetime]:
return value


class MongodbUtilsV1API(MongodbV1API): # type: ignore[misc]
class MongodbUtilsV1API(MongodbV1API):
"""
Extensions for MongoDB V1 that provide safer ergonomics.

Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/mongodb/v1alpha1/custom_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import datetime, timezone
from typing import Any, Optional

from scaleway.mongodb.v1alpha1.api import MongodbV1Alpha1API # type: ignore[import-untyped]
from scaleway.mongodb.v1alpha1.api import MongodbV1Alpha1API


def _ensure_tzaware_utc(value: Optional[datetime]) -> Optional[datetime]:
Expand All @@ -14,7 +14,7 @@ def _ensure_tzaware_utc(value: Optional[datetime]) -> Optional[datetime]:
return value


class MongodbUtilsV1Alpha1API(MongodbV1Alpha1API): # type: ignore[misc]
class MongodbUtilsV1Alpha1API(MongodbV1Alpha1API):
"""
Extensions for MongoDB V1alpha1 that provide safer ergonomics.

Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/rdb/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ def wait_for_database_backup(
options = WaitForOptions()

if not options.stop:
options.stop = (
lambda res: res.status not in DATABASE_BACKUP_TRANSIENT_STATUSES
options.stop = lambda res: (
res.status not in DATABASE_BACKUP_TRANSIENT_STATUSES
)

return wait_for_resource(
Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/vpcgw/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,8 @@ def wait_for_gateway_network(
options = WaitForOptions()

if not options.stop:
options.stop = (
lambda res: res.status not in GATEWAY_NETWORK_TRANSIENT_STATUSES
options.stop = lambda res: (
res.status not in GATEWAY_NETWORK_TRANSIENT_STATUSES
)

return wait_for_resource(
Expand Down
4 changes: 2 additions & 2 deletions scaleway/scaleway/vpcgw/v2/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,8 @@ def wait_for_gateway_network(
options = WaitForOptions()

if not options.stop:
options.stop = (
lambda res: res.status not in GATEWAY_NETWORK_TRANSIENT_STATUSES
options.stop = lambda res: (
res.status not in GATEWAY_NETWORK_TRANSIENT_STATUSES
)

return wait_for_resource(
Expand Down
2 changes: 1 addition & 1 deletion scaleway/vcr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def scrub_data(data):
return data


def scrub_json_string(raw: bytes | str) -> bytes | str:
def scrub_json_string(raw: bytes | str) -> str:
if isinstance(raw, bytes):
raw = raw.decode("utf-8")

Expand Down
Loading