Skip to content
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
1 change: 1 addition & 0 deletions scaleway-async/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ select = [
"FBT", # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
"FIX", # https://docs.astral.sh/ruff/rules/#flake8-fixme-fix
"FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
"T10", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"YTT", # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
]
Expand Down
3 changes: 1 addition & 2 deletions scaleway-async/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def random_date(min: Union[str, datetime], max: Union[str, datetime]) -> datetim
min_time = min if isinstance(min, datetime) else string_to_datetime(min)
max_time = max if isinstance(max, datetime) else string_to_datetime(max)

random_time = min_time + system_random.random() * (max_time - min_time)
return random_time
return min_time + system_random.random() * (max_time - min_time)


def datetime_to_string(date: datetime) -> str:
Expand Down
1 change: 1 addition & 0 deletions scaleway-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ select = [
"ERA", # https://docs.astral.sh/ruff/rules/#eradicate-era
"FIX", # https://docs.astral.sh/ruff/rules/#flake8-fixme-fix
"FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
"T10", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"YTT", # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
]
Expand Down
3 changes: 1 addition & 2 deletions scaleway-core/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def random_date(min: Union[str, datetime], max: Union[str, datetime]) -> datetim
min_time = min if isinstance(min, datetime) else string_to_datetime(min)
max_time = max if isinstance(max, datetime) else string_to_datetime(max)

random_time = min_time + system_random.random() * (max_time - min_time)
return random_time
return min_time + system_random.random() * (max_time - min_time)


def datetime_to_string(date: datetime) -> str:
Expand Down
1 change: 1 addition & 0 deletions scaleway/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ select = [
"FBT", # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
"FIX", # https://docs.astral.sh/ruff/rules/#flake8-fixme-fix
"FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
"T10", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"YTT", # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
]
Expand Down
4 changes: 1 addition & 3 deletions scaleway/scaleway/instance/v1/custom_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ def get_all_server_user_data(
print("value: ", value)
user_data[key] = value.content

res = GetAllServerUserDataResponse(user_data=user_data)

return res
return GetAllServerUserDataResponse(user_data=user_data)

def set_all_server_user_data(
self,
Expand Down
3 changes: 1 addition & 2 deletions scaleway/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def random_date(min: Union[str, datetime], max: Union[str, datetime]) -> datetim
min_time = min if isinstance(min, datetime) else string_to_datetime(min)
max_time = max if isinstance(max, datetime) else string_to_datetime(max)

random_time = min_time + system_random.random() * (max_time - min_time)
return random_time
return min_time + system_random.random() * (max_time - min_time)


def datetime_to_string(date: datetime) -> str:
Expand Down
Loading