From c68cb8aff112641702855314f30e41fa25244c3c Mon Sep 17 00:00:00 2001 From: Laure Masson Date: Wed, 23 Jul 2025 15:15:06 +0200 Subject: [PATCH 1/2] fix(core): add guard to _typeshed module feat(tem): add blocklisted flag (#830) feat(tem): add blocklisted flag (#830) --- scaleway-core/scaleway_core/utils/resolve_one_of.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scaleway-core/scaleway_core/utils/resolve_one_of.py b/scaleway-core/scaleway_core/utils/resolve_one_of.py index 87f1dc5e..13a04935 100644 --- a/scaleway-core/scaleway_core/utils/resolve_one_of.py +++ b/scaleway-core/scaleway_core/utils/resolve_one_of.py @@ -1,7 +1,10 @@ from collections.abc import Callable from dataclasses import dataclass from typing import Any, Dict, Generic, List, Optional, TypeVar -from _typeshed import SupportsKeysAndGetItem +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from _typeshed import SupportsKeysAndGetItem from scaleway_core.profile import ProfileDefaults From 8967819f43942473678cb24d1b91126fbb657321 Mon Sep 17 00:00:00 2001 From: Laure Masson Date: Wed, 23 Jul 2025 16:45:14 +0200 Subject: [PATCH 2/2] fix annotations --- scaleway-core/scaleway_core/utils/resolve_one_of.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scaleway-core/scaleway_core/utils/resolve_one_of.py b/scaleway-core/scaleway_core/utils/resolve_one_of.py index 13a04935..5dc2249f 100644 --- a/scaleway-core/scaleway_core/utils/resolve_one_of.py +++ b/scaleway-core/scaleway_core/utils/resolve_one_of.py @@ -1,12 +1,8 @@ +from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from typing import Any, Dict, Generic, List, Optional, TypeVar -from typing import TYPE_CHECKING -if TYPE_CHECKING: - from _typeshed import SupportsKeysAndGetItem - -from scaleway_core.profile import ProfileDefaults T = TypeVar("T")