Skip to content

Commit b971332

Browse files
committed
Ruff formatting
1 parent 24d072b commit b971332

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

.github/workflows/_integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
services:
1313
integration-db:
14-
image: ghcr.io/diamondlightsource/pato-backend-db:master
14+
image: ghcr.io/diamondlightsource/scaup-backend-db:master
1515
ports:
1616
- 3306:3306
1717
strategy:
@@ -29,7 +29,7 @@ jobs:
2929
pip install .[dev]
3030
- name: Test with pytest
3131
env:
32-
CONFIG_PATH: /home/runner/work/pato-backend/pato-backend/config.json
32+
CONFIG_PATH: /home/runner/work/scaup-backend/scaup-backend/config.json
3333
run: |
3434
tox -e pytest
3535
- name: Upload coverage to Codecov

database/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM bitnami/postgresql:17-debian-12
22

33
WORKDIR /docker-entrypoint-initdb.d
44

5+
# Dummy data
56
ADD data.sql /docker-entrypoint-initdb.d/data.sql
67

78
ENV POSTGRESQL_PASSWORD sample_root

src/scaup/crud/pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def add_dewar(self, dewar: Row):
153153
table = (
154154
(
155155
"Proposal",
156-
f"{dewar.proposalCode}{dewar.proposalNumber}-{dewar.visitNumber or "?"}",
156+
f"{dewar.proposalCode}{dewar.proposalNumber}-{dewar.visitNumber or '?'}",
157157
),
158158
("Sample Collection", dewar.name),
159159
("Code", dewar.code),
@@ -346,7 +346,7 @@ def header(self):
346346

347347
def footer(self):
348348
self.set_xy(5, -8)
349-
self.cell(text=f"Printed on {datetime.now().strftime("%d/%m/%Y %H:%M")}")
349+
self.cell(text=f"Printed on {datetime.now().strftime('%d/%m/%Y %H:%M')}")
350350

351351
def add_table(
352352
self,

src/scaup/crud/samples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def create_sample(shipmentId: int, params: SampleIn, token: str):
7373
{
7474
"shipmentId": shipmentId,
7575
**params.model_dump(exclude_unset=True, exclude={"copies"}),
76-
"name": f"{params.name}_{i+sample_count}",
76+
"name": f"{params.name}_{i + sample_count}",
7777
}
7878
for i in range(params.copies)
7979
],

src/scaup/models/containers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ class BaseContainer(BaseModel):
2525
name: Optional[str] = Field(
2626
default=None,
2727
description=(
28-
"Base container name. If name is not provided, the container's type followed"
29-
"by the container index is used"
28+
"Base container name. If name is not provided, the container's type followedby the container index is used"
3029
),
3130
)
3231
comments: Optional[str] = None

src/scaup/utils/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def wrap(*args, **kwargs):
7070
case ForeignKeyViolation():
7171
columns = _get_columns_and_values(e.__cause__.diag.message_detail)
7272
raise HTTPException(
73-
status_code=status.HTTP_404_NOT_FOUND, detail=f"Invalid {", ".join(columns.keys())} provided"
73+
status_code=status.HTTP_404_NOT_FOUND, detail=f"Invalid {', '.join(columns.keys())} provided"
7474
)
7575
case _:
7676
app_logger.warning("Integrity error whilst performing request", exc_info=e)

0 commit comments

Comments
 (0)