Skip to content

Commit ef51925

Browse files
committed
src: format code with newer version of Black
1 parent 8935b26 commit ef51925

File tree

5 files changed

+35
-67
lines changed

5 files changed

+35
-67
lines changed

cellengine/resources/compensation.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ def create(
137137
channels: List[str],
138138
spill_matrix: List[float],
139139
dataframe: Optional[None],
140-
) -> Compensation:
141-
...
140+
) -> Compensation: ...
142141

143142
@overload
144143
@classmethod
@@ -148,8 +147,7 @@ def create(
148147
name: str,
149148
*,
150149
dataframe: DataFrame,
151-
) -> Compensation:
152-
...
150+
) -> Compensation: ...
153151

154152
@classmethod
155153
def create(
@@ -230,14 +228,12 @@ def dataframe_as_html(self):
230228
return self.dataframe._repr_html_()
231229

232230
@overload
233-
def apply(self, file: FcsFile, inplace: Literal[True] = ..., **kwargs) -> None:
234-
...
231+
def apply(self, file: FcsFile, inplace: Literal[True] = ..., **kwargs) -> None: ...
235232

236233
@overload
237234
def apply(
238235
self, file: FcsFile, inplace: Literal[False] = ..., **kwargs
239-
) -> DataFrame:
240-
...
236+
) -> DataFrame: ...
241237

242238
def apply(
243239
self, file: FcsFile, inplace: Optional[bool] = True, **kwargs

cellengine/resources/experiment.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -420,17 +420,15 @@ def get_compensation(
420420
@overload
421421
def create_compensation(
422422
self, name: str, channels: List[str], spill_matrix: List[float]
423-
) -> Compensation:
424-
...
423+
) -> Compensation: ...
425424

426425
@overload
427426
def create_compensation(
428427
self,
429428
name: str,
430429
*,
431430
dataframe: DataFrame,
432-
) -> Compensation:
433-
...
431+
) -> Compensation: ...
434432

435433
def create_compensation(
436434
self,
@@ -523,14 +521,12 @@ def delete_gates(self, ids: List[str]) -> None:
523521
@overload
524522
def create_rectangle_gate(
525523
self, *args, create_population: Literal[True], **kwargs
526-
) -> Tuple[RectangleGate, Population]:
527-
...
524+
) -> Tuple[RectangleGate, Population]: ...
528525

529526
@overload
530527
def create_rectangle_gate(
531528
self, *args, create_population: Literal[False], **kwargs
532-
) -> RectangleGate:
533-
...
529+
) -> RectangleGate: ...
534530

535531
def create_rectangle_gate(
536532
self, *args, create_population: bool = True, **kwargs
@@ -550,14 +546,12 @@ def create_rectangle_gate(
550546
@overload
551547
def create_polygon_gate(
552548
self, *args, create_population: Literal[True], **kwargs
553-
) -> Tuple[PolygonGate, Population]:
554-
...
549+
) -> Tuple[PolygonGate, Population]: ...
555550

556551
@overload
557552
def create_polygon_gate(
558553
self, *args, create_population: Literal[False], **kwargs
559-
) -> PolygonGate:
560-
...
554+
) -> PolygonGate: ...
561555

562556
def create_polygon_gate(
563557
self, *args, create_population: bool = True, **kwargs
@@ -577,14 +571,12 @@ def create_polygon_gate(
577571
@overload
578572
def create_ellipse_gate(
579573
self, *args, create_population: Literal[True], **kwargs
580-
) -> Tuple[EllipseGate, Population]:
581-
...
574+
) -> Tuple[EllipseGate, Population]: ...
582575

583576
@overload
584577
def create_ellipse_gate(
585578
self, *args, create_population: Literal[False], **kwargs
586-
) -> EllipseGate:
587-
...
579+
) -> EllipseGate: ...
588580

589581
def create_ellipse_gate(
590582
self, *args, create_population: bool = True, **kwargs
@@ -604,14 +596,12 @@ def create_ellipse_gate(
604596
@overload
605597
def create_range_gate(
606598
self, *args, create_population: Literal[True], **kwargs
607-
) -> Tuple[RangeGate, Population]:
608-
...
599+
) -> Tuple[RangeGate, Population]: ...
609600

610601
@overload
611602
def create_range_gate(
612603
self, *args, create_population: Literal[False], **kwargs
613-
) -> RangeGate:
614-
...
604+
) -> RangeGate: ...
615605

616606
def create_range_gate(
617607
self, *args, create_population: bool = True, **kwargs
@@ -646,14 +636,12 @@ def create_split_gate(
646636
@overload
647637
def create_quadrant_gate(
648638
self, *args, create_population: Literal[True], **kwargs
649-
) -> Tuple[QuadrantGate, List[Population]]:
650-
...
639+
) -> Tuple[QuadrantGate, List[Population]]: ...
651640

652641
@overload
653642
def create_quadrant_gate(
654643
self, *args, create_population: Literal[False], **kwargs
655-
) -> QuadrantGate:
656-
...
644+
) -> QuadrantGate: ...
657645

658646
def create_quadrant_gate(
659647
self, *args, create_population: bool = True, **kwargs

cellengine/resources/fcs_file.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,9 @@ def create_from_dataframe(
353353
"""
354354

355355
if "$COM" not in headers:
356-
headers[
357-
"$COM"
358-
] = f"Created by the CellEngine Python Toolkit v{ce.__version__}"
356+
headers["$COM"] = (
357+
f"Created by the CellEngine Python Toolkit v{ce.__version__}"
358+
)
359359

360360
if df.columns.nlevels > 1:
361361
channels = df.columns.get_level_values(0).tolist()
@@ -565,17 +565,15 @@ def get_events(
565565
inplace: Optional[bool] = ...,
566566
destination: None = ...,
567567
**kwargs: Any,
568-
) -> DataFrame:
569-
...
568+
) -> DataFrame: ...
570569

571570
@overload
572571
def get_events(
573572
self,
574573
inplace: Optional[bool] = ...,
575574
destination: str = ...,
576575
**kwargs: Any,
577-
) -> None:
578-
...
576+
) -> None: ...
579577

580578
def get_events(
581579
self,

cellengine/resources/gate.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ def create(
250250
fcs_file: Optional[str] = None,
251251
create_population: Literal[True] = True,
252252
parent_population_id: Optional[str] = None,
253-
) -> Tuple[RectangleGate, Population]:
254-
...
253+
) -> Tuple[RectangleGate, Population]: ...
255254

256255
@overload
257256
@classmethod
@@ -272,8 +271,7 @@ def create(
272271
fcs_file_id: Optional[str] = None,
273272
fcs_file: Optional[str] = None,
274273
create_population: Literal[False] = False,
275-
) -> RectangleGate:
276-
...
274+
) -> RectangleGate: ...
277275

278276
@classmethod
279277
def create(
@@ -418,8 +416,7 @@ def create(
418416
fcs_file: Optional[str] = None,
419417
create_population: Literal[True] = True,
420418
parent_population_id: Optional[str] = None, # TODO Ungated
421-
) -> Tuple[PolygonGate, Population]:
422-
...
419+
) -> Tuple[PolygonGate, Population]: ...
423420

424421
@overload
425422
@classmethod
@@ -437,8 +434,7 @@ def create(
437434
fcs_file_id: Optional[str] = None,
438435
fcs_file: Optional[str] = None,
439436
create_population: Literal[False] = False,
440-
) -> PolygonGate:
441-
...
437+
) -> PolygonGate: ...
442438

443439
@classmethod
444440
def create(
@@ -571,8 +567,7 @@ def create(
571567
fcs_file: Optional[str] = None,
572568
create_population: Literal[True] = True,
573569
parent_population_id: Optional[str] = None, # TODO Ungated
574-
) -> Tuple[EllipseGate, Population]:
575-
...
570+
) -> Tuple[EllipseGate, Population]: ...
576571

577572
@overload
578573
@classmethod
@@ -593,8 +588,7 @@ def create(
593588
fcs_file_id: Optional[str] = None,
594589
fcs_file: Optional[str] = None,
595590
create_population: Literal[False] = False,
596-
) -> EllipseGate:
597-
...
591+
) -> EllipseGate: ...
598592

599593
@classmethod
600594
def create(
@@ -751,8 +745,7 @@ def create(
751745
fcs_file: Optional[str] = None,
752746
create_population: Literal[True] = True,
753747
parent_population_id: Optional[str] = None,
754-
) -> Tuple[RangeGate, Population]:
755-
...
748+
) -> Tuple[RangeGate, Population]: ...
756749

757750
@overload
758751
@classmethod
@@ -771,8 +764,7 @@ def create(
771764
fcs_file_id: Optional[str] = None,
772765
fcs_file: Optional[str] = None,
773766
create_population: Literal[False] = False,
774-
) -> RangeGate:
775-
...
767+
) -> RangeGate: ...
776768

777769
@classmethod
778770
def create(
@@ -915,8 +907,7 @@ def create(
915907
fcs_file: Optional[str] = None,
916908
create_population: Literal[True] = True,
917909
parent_population_id: Optional[str] = None, # TODO Ungated
918-
) -> Tuple[QuadrantGate, List[Population]]:
919-
...
910+
) -> Tuple[QuadrantGate, List[Population]]: ...
920911

921912
@overload
922913
@classmethod
@@ -938,8 +929,7 @@ def create(
938929
fcs_file_id: Optional[str] = None,
939930
fcs_file: Optional[str] = None,
940931
create_population: Literal[False] = False,
941-
) -> QuadrantGate:
942-
...
932+
) -> QuadrantGate: ...
943933

944934
@classmethod
945935
def create(
@@ -1134,8 +1124,7 @@ def create(
11341124
fcs_file: Optional[str] = None,
11351125
create_population: Literal[True] = True,
11361126
parent_population_id: Optional[str] = None, # TODO Ungated
1137-
) -> Tuple[SplitGate, List[Population]]:
1138-
...
1127+
) -> Tuple[SplitGate, List[Population]]: ...
11391128

11401129
@overload
11411130
@classmethod
@@ -1154,8 +1143,7 @@ def create(
11541143
fcs_file_id: Optional[str] = None,
11551144
fcs_file: Optional[str] = None,
11561145
create_population: Literal[False] = False,
1157-
) -> SplitGate:
1158-
...
1146+
) -> SplitGate: ...
11591147

11601148
@classmethod
11611149
def create(

cellengine/resources/scaleset.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,12 @@ def scale_fn_for_channel(self, channel: str) -> Callable[[float], float]:
131131
@overload
132132
def apply(
133133
self, file: FcsFile, clamp_q: bool = False, in_place: Literal[True] = ...
134-
) -> None:
135-
...
134+
) -> None: ...
136135

137136
@overload
138137
def apply(
139138
self, file: FcsFile, clamp_q: bool = False, in_place: Literal[False] = ...
140-
) -> DataFrame:
141-
...
139+
) -> DataFrame: ...
142140

143141
def apply(self, file: FcsFile, clamp_q: bool = False, in_place: bool = True):
144142
"""Apply the scaleset to a file.

0 commit comments

Comments
 (0)