Skip to content

Commit 58e58d5

Browse files
authored
Style: Ruff autofixes (#167)
1 parent 089dd9e commit 58e58d5

File tree

7 files changed

+227
-250
lines changed

7 files changed

+227
-250
lines changed

docs/css/custom.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[data-md-color-scheme="default"] {
22
--md-default-bg-color: #fff7ec;
3-
--md-primary-fg-color: #B8271C;
3+
--md-primary-fg-color: #b8271c;
44
--md-typeset-a-color: #0099ff;
55
--md-code-bg-color: #e7e7e7;
66
}
77

88
[data-md-color-scheme="slate"] {
9-
--md-primary-fg-color: #B8271C;
9+
--md-primary-fg-color: #b8271c;
1010
--md-default-fg-color: #fff7ec;
1111
--md-default-bg-color: #111111;
1212
}
@@ -31,5 +31,7 @@
3131
.md-typeset h2,
3232
.md-typeset h3 {
3333
font-weight: 400;
34-
color: var(--md-primary-fg-color-dark); /* this actually works for both light and dark themes */
35-
}
34+
color: var(
35+
--md-primary-fg-color-dark
36+
); /* this actually works for both light and dark themes */
37+
}

src/swerex/deployment/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class DockerDeploymentConfig(BaseModel):
3737
"""Whether to remove the image after it has stopped."""
3838
python_standalone_dir: str | None = None
3939
"""The directory to use for the python standalone."""
40-
40+
4141
type: Literal["docker"] = "docker"
4242
"""Discriminator for (de)serialization/CLI. Do not change."""
4343

src/swerex/deployment/docker.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def _pull_image(self) -> None:
146146
@property
147147
def glibc_dockerfile(self) -> str:
148148
# will only work with glibc-based systems
149-
text = (
149+
return (
150150
"ARG BASE_IMAGE\n\n"
151151
# Build stage for standalone Python
152152
"FROM python:3.11-slim AS builder\n"
@@ -179,12 +179,11 @@ def glibc_dockerfile(self) -> str:
179179
# Create symlink to make the executable available in PATH
180180
f"RUN {self._config.python_standalone_dir}/python3.11/bin/{REMOTE_EXECUTABLE_NAME} --version\n"
181181
)
182-
return text
183182

184183
def _build_image(self):
185184
dockerfile = self.glibc_dockerfile
186185
# build docker image without a tag, but get the image id
187-
image_id = (
186+
return (
188187
subprocess.check_output(
189188
[
190189
"docker",
@@ -199,7 +198,6 @@ def _build_image(self):
199198
.decode()
200199
.strip()
201200
)
202-
return image_id
203201

204202
async def start(self):
205203
"""Starts the runtime."""

src/swerex/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from starlette.exceptions import HTTPException as StarletteHTTPException
1515

1616
from swerex import __version__
17-
1817
from swerex.runtime.abstract import (
1918
Action,
2019
CloseResponse,

0 commit comments

Comments
 (0)