Skip to content

Commit 452fe91

Browse files
committed
remove unmarshall logic
1 parent 579da4e commit 452fe91

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
poetry --version
5858
- name: Install dependencies and library
5959
run: poetry install
60-
- name: Check typing
60+
- name: Check typing with mypy
6161
run: poetry run mypy --install-types --non-interactive --strict --no-warn-unused-ignores $(echo "${{ matrix.lib }}" | tr "-" "_")
6262
- name: Check typing with ty
6363
run: poetry run ty check

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ typing:
3737
for lib in $(LIBRARIES); do \
3838
cd ${WORKDIR}/$$lib && \
3939
poetry run mypy --version && \
40-
poetry run mypy --install-types --non-interactive --strict $$(echo $$lib | tr "-" "_"); \
40+
poetry run mypy --install-types --non-interactive --strict $$(echo $$lib | tr "-" "_") && \
41+
poetry run ty version && \
42+
poetry run ty check && \
43+
poetry run pyrefly --version && \
44+
poetry run pyrefly check; \
4145
done
4246

4347
lint:

scaleway-core/scaleway_core/utils/resolve_one_of.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ class OneOfPossibility(Generic[T]):
1010

1111
value: Optional[T]
1212

13-
marshal_func: Optional[Callable[[Any, T], T]]
14-
1513
default: Optional[T] = None
1614

1715

@@ -30,13 +28,6 @@ def resolve_one_of(
3028
# Get the first non-empty default
3129
for possibility in possibilities:
3230
if possibility.default is not None:
33-
if possibility.marshal_func is not None:
34-
# When no actual value, call with None as value
35-
return {
36-
possibility.param: possibility.marshal_func(
37-
None, possibility.default
38-
)
39-
}
4031
return {possibility.param: possibility.default}
4132

4233
# If required, raise an error

0 commit comments

Comments
 (0)