Skip to content

Commit ff7ae2c

Browse files
lint
1 parent 868c404 commit ff7ae2c

4 files changed

Lines changed: 18 additions & 11 deletions

File tree

src/allotropy/allotrope/schema_mappers/adm/plate_reader/rec/_2025/_03/plate_reader.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
MeasurementAggregateDocument,
1818
MeasurementDocument,
1919
Model,
20+
PeakItem,
21+
PeakList,
2022
PlateReaderAggregateDocument,
2123
PlateReaderDocumentItem,
2224
ProcessedDataAggregateDocument,
2325
ProcessedDataDocumentItem,
2426
SampleDocument,
2527
TQuantityValueModel,
26-
PeakItem,
27-
PeakList,
2828
)
2929
from allotropy.allotrope.models.shared.components.plate_reader import SampleRoleType
3030
from allotropy.allotrope.models.shared.definitions.custom import (
@@ -196,6 +196,7 @@ class Measurement:
196196

197197
calc_docs_custom_info: dict[str, Any] | None = None
198198

199+
199200
@dataclass(frozen=True)
200201
class MeasurementGroup:
201202
measurements: list[Measurement]
@@ -393,18 +394,22 @@ def _get_ultraviolet_absorbance_measurement_document(
393394
processed_data_document=[
394395
ProcessedDataDocumentItem(
395396
processed_data_identifier=measurement.processed_data_document.identifier,
396-
**({
397-
"data_processing_document": {
397+
data_processing_document=(
398+
{
398399
"concentration factor": quantity_or_none(
399400
TQuantityValueNanogramPerMicroliter,
400401
measurement.processed_data_document.concentration_factor,
401402
)
402403
}
403-
} if measurement.processed_data_document.concentration_factor is not None else {}),
404+
if measurement.processed_data_document.concentration_factor
405+
is not None
406+
else None
407+
),
404408
peak_list=PeakList(
405409
peak=[
406410
add_custom_information_document(
407-
PeakItem(), self._process_peak_custom_info(peak_custom_info)
411+
PeakItem(),
412+
self._process_peak_custom_info(peak_custom_info),
408413
)
409414
for peak_custom_info in (
410415
measurement.processed_data_document.peak_list_custom_info
@@ -856,9 +861,11 @@ def _get_error_aggregate_document(
856861
else None
857862
)
858863

859-
def _process_peak_custom_info(self, peak_custom_info: dict[str, Any]) -> dict[str, Any]:
864+
def _process_peak_custom_info(
865+
self, peak_custom_info: dict[str, Any]
866+
) -> dict[str, Any]:
860867
"""Process peak custom info by applying proper units to measured values."""
861-
processed_info = {}
868+
processed_info: dict[str, Any] = {}
862869

863870
for key, value in peak_custom_info.items():
864871
if key == "peak mean diameter":

src/allotropy/parsers/unchained_labs_lunatic/unchained_labs_lunatic_calcdocs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from allotropy.allotrope.models.shared.definitions.units import UNITLESS
2-
from allotropy.allotrope.schema_mappers.adm.plate_reader.rec._2024._06.plate_reader import (
2+
from allotropy.allotrope.schema_mappers.adm.plate_reader.rec._2025._03.plate_reader import (
33
MeasurementGroup,
44
)
55
from allotropy.calcdocs.config import (

src/allotropy/parsers/unchained_labs_lunatic/unchained_labs_lunatic_structure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def _extract_peak_data(well_plate_data: SeriesData) -> list[dict[str, Any]]:
6060
peak_numbers.add(int(match.group(1)))
6161

6262
for peak_num in sorted(peak_numbers):
63-
peak_info = {}
63+
peak_info: dict[str, Any] = {}
6464

6565
mean_dia = well_plate_data.get(float, f"peak {peak_num} mean dia (nm)")
6666
if mean_dia is not None:

tests/parsers/unchained_labs_lunatic/unchained_labs_lunatic_structure_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pandas as pd
55
import pytest
66

7-
from allotropy.allotrope.schema_mappers.adm.plate_reader.rec._2024._06.plate_reader import (
7+
from allotropy.allotrope.schema_mappers.adm.plate_reader.rec._2025._03.plate_reader import (
88
MeasurementGroup,
99
)
1010
from allotropy.exceptions import AllotropeConversionError

0 commit comments

Comments
 (0)