Skip to content

Commit 434f8c0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b83cf2d commit 434f8c0

File tree

18 files changed

+189
-180
lines changed

18 files changed

+189
-180
lines changed

install.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ def flatten(list):
4545

4646
option_strings = flatten(
4747
[
48-
[opt, "--no-" + opt[2:], "--no" + opt[2:]]
49-
if opt.startswith("--")
50-
else [opt]
48+
(
49+
[opt, "--no-" + opt[2:], "--no" + opt[2:]]
50+
if opt.startswith("--")
51+
else [opt]
52+
)
5153
for opt in option_strings
5254
]
5355
)

legate/core/_legion/operation.py

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -795,9 +795,11 @@ def add_src_requirement(
795795
projection,
796796
legion.LEGION_READ_ONLY,
797797
coherence,
798-
upper_bound.get_root().handle
799-
if parent is None
800-
else parent.handle,
798+
(
799+
upper_bound.get_root().handle
800+
if parent is None
801+
else parent.handle
802+
),
801803
tag,
802804
False,
803805
)
@@ -808,9 +810,11 @@ def add_src_requirement(
808810
projection,
809811
legion.LEGION_READ_ONLY,
810812
coherence,
811-
upper_bound.get_root().handle
812-
if parent is None
813-
else parent.handle,
813+
(
814+
upper_bound.get_root().handle
815+
if parent is None
816+
else parent.handle
817+
),
814818
tag,
815819
False,
816820
)
@@ -874,9 +878,11 @@ def add_dst_requirement(
874878
projection,
875879
privilege,
876880
coherence,
877-
upper_bound.get_root().handle
878-
if parent is None
879-
else parent.handle,
881+
(
882+
upper_bound.get_root().handle
883+
if parent is None
884+
else parent.handle
885+
),
880886
tag,
881887
False,
882888
)
@@ -887,9 +893,11 @@ def add_dst_requirement(
887893
projection,
888894
redop,
889895
coherence,
890-
upper_bound.get_root().handle
891-
if parent is None
892-
else parent.handle,
896+
(
897+
upper_bound.get_root().handle
898+
if parent is None
899+
else parent.handle
900+
),
893901
tag,
894902
False,
895903
)
@@ -901,9 +909,11 @@ def add_dst_requirement(
901909
projection,
902910
privilege,
903911
coherence,
904-
upper_bound.get_root().handle
905-
if parent is None
906-
else parent.handle,
912+
(
913+
upper_bound.get_root().handle
914+
if parent is None
915+
else parent.handle
916+
),
907917
tag,
908918
False,
909919
)
@@ -914,9 +924,11 @@ def add_dst_requirement(
914924
projection,
915925
redop,
916926
coherence,
917-
upper_bound.get_root().handle
918-
if parent is None
919-
else parent.handle,
927+
(
928+
upper_bound.get_root().handle
929+
if parent is None
930+
else parent.handle
931+
),
920932
tag,
921933
False,
922934
)
@@ -980,9 +992,11 @@ def add_src_indirect_requirement(
980992
field.fid if isinstance(field, FieldID) else field,
981993
),
982994
coherence,
983-
upper_bound.get_root().handle
984-
if parent is None
985-
else parent.handle,
995+
(
996+
upper_bound.get_root().handle
997+
if parent is None
998+
else parent.handle
999+
),
9861000
tag,
9871001
is_range,
9881002
False,
@@ -997,9 +1011,11 @@ def add_src_indirect_requirement(
9971011
field.fid if isinstance(field, FieldID) else field,
9981012
),
9991013
coherence,
1000-
upper_bound.get_root().handle
1001-
if parent is None
1002-
else parent.handle,
1014+
(
1015+
upper_bound.get_root().handle
1016+
if parent is None
1017+
else parent.handle
1018+
),
10031019
tag,
10041020
is_range,
10051021
False,
@@ -1053,9 +1069,11 @@ def add_dst_indirect_requirement(
10531069
field.fid if isinstance(field, FieldID) else field,
10541070
),
10551071
coherence,
1056-
upper_bound.get_root().handle
1057-
if parent is None
1058-
else parent.handle,
1072+
(
1073+
upper_bound.get_root().handle
1074+
if parent is None
1075+
else parent.handle
1076+
),
10591077
tag,
10601078
is_range,
10611079
False,
@@ -1070,9 +1088,11 @@ def add_dst_indirect_requirement(
10701088
field.fid if isinstance(field, FieldID) else field,
10711089
),
10721090
coherence,
1073-
upper_bound.get_root().handle
1074-
if parent is None
1075-
else parent.handle,
1091+
(
1092+
upper_bound.get_root().handle
1093+
if parent is None
1094+
else parent.handle
1095+
),
10761096
tag,
10771097
is_range,
10781098
False,

legate/core/_legion/region.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,11 @@ def __init__(
246246
existing.handle,
247247
legion.LEGION_WRITE_DISCARD,
248248
coherence,
249-
existing.get_root().handle
250-
if parent is None
251-
else parent.handle,
249+
(
250+
existing.get_root().handle
251+
if parent is None
252+
else parent.handle
253+
),
252254
tag,
253255
False,
254256
)
@@ -259,9 +261,11 @@ def __init__(
259261
proj,
260262
legion.LEGION_WRITE_DISCARD,
261263
coherence,
262-
existing.get_root().handle
263-
if parent is None
264-
else parent.handle,
264+
(
265+
existing.get_root().handle
266+
if parent is None
267+
else parent.handle
268+
),
265269
tag,
266270
False,
267271
)
@@ -287,9 +291,11 @@ def __init__(
287291
proj,
288292
legion.LEGION_WRITE_DISCARD,
289293
coherence,
290-
existing.get_root().handle
291-
if parent is None
292-
else parent.handle,
294+
(
295+
existing.get_root().handle
296+
if parent is None
297+
else parent.handle
298+
),
293299
tag,
294300
False,
295301
)

legate/core/_legion/task.py

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,11 @@ def add_no_access_requirement(
603603
projection,
604604
legion.LEGION_NO_ACCESS,
605605
coherence,
606-
upper_bound.get_root().handle
607-
if parent is None
608-
else parent.handle,
606+
(
607+
upper_bound.get_root().handle
608+
if parent is None
609+
else parent.handle
610+
),
609611
tag,
610612
False,
611613
)
@@ -616,9 +618,11 @@ def add_no_access_requirement(
616618
projection,
617619
legion.LEGION_NO_ACCESS,
618620
coherence,
619-
upper_bound.get_root().handle
620-
if parent is None
621-
else parent.handle,
621+
(
622+
upper_bound.get_root().handle
623+
if parent is None
624+
else parent.handle
625+
),
622626
tag,
623627
False,
624628
)
@@ -679,9 +683,11 @@ def add_read_requirement(
679683
projection,
680684
legion.LEGION_READ_ONLY,
681685
coherence,
682-
upper_bound.get_root().handle
683-
if parent is None
684-
else parent.handle,
686+
(
687+
upper_bound.get_root().handle
688+
if parent is None
689+
else parent.handle
690+
),
685691
tag,
686692
False,
687693
)
@@ -692,9 +698,11 @@ def add_read_requirement(
692698
projection,
693699
legion.LEGION_READ_ONLY,
694700
coherence,
695-
upper_bound.get_root().handle
696-
if parent is None
697-
else parent.handle,
701+
(
702+
upper_bound.get_root().handle
703+
if parent is None
704+
else parent.handle
705+
),
698706
tag,
699707
False,
700708
)
@@ -755,9 +763,11 @@ def add_write_requirement(
755763
projection,
756764
legion.LEGION_WRITE_DISCARD,
757765
coherence,
758-
upper_bound.get_root().handle
759-
if parent is None
760-
else parent.handle,
766+
(
767+
upper_bound.get_root().handle
768+
if parent is None
769+
else parent.handle
770+
),
761771
tag,
762772
False,
763773
)
@@ -768,9 +778,11 @@ def add_write_requirement(
768778
projection,
769779
legion.LEGION_WRITE_DISCARD,
770780
coherence,
771-
upper_bound.get_root().handle
772-
if parent is None
773-
else parent.handle,
781+
(
782+
upper_bound.get_root().handle
783+
if parent is None
784+
else parent.handle
785+
),
774786
tag,
775787
False,
776788
)
@@ -831,9 +843,11 @@ def add_read_write_requirement(
831843
projection,
832844
legion.LEGION_READ_WRITE,
833845
coherence,
834-
upper_bound.get_root().handle
835-
if parent is None
836-
else parent.handle,
846+
(
847+
upper_bound.get_root().handle
848+
if parent is None
849+
else parent.handle
850+
),
837851
tag,
838852
False,
839853
)
@@ -844,9 +858,11 @@ def add_read_write_requirement(
844858
projection,
845859
legion.LEGION_READ_WRITE,
846860
coherence,
847-
upper_bound.get_root().handle
848-
if parent is None
849-
else parent.handle,
861+
(
862+
upper_bound.get_root().handle
863+
if parent is None
864+
else parent.handle
865+
),
850866
tag,
851867
False,
852868
)
@@ -908,9 +924,11 @@ def add_reduction_requirement(
908924
projection,
909925
redop,
910926
coherence,
911-
upper_bound.get_root().handle
912-
if parent is None
913-
else parent.handle,
927+
(
928+
upper_bound.get_root().handle
929+
if parent is None
930+
else parent.handle
931+
),
914932
tag,
915933
False,
916934
)
@@ -921,9 +939,11 @@ def add_reduction_requirement(
921939
projection,
922940
redop,
923941
coherence,
924-
upper_bound.get_root().handle
925-
if parent is None
926-
else parent.handle,
942+
(
943+
upper_bound.get_root().handle
944+
if parent is None
945+
else parent.handle
946+
),
927947
tag,
928948
False,
929949
)

legate/core/_legion/util.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,11 @@ def launch(
176176
runtime: legion.legion_runtime_t,
177177
context: legion.legion_context_t,
178178
**kwargs: Any,
179-
) -> T:
180-
...
179+
) -> T: ...
181180

182181

183182
class Mappable(Protocol):
184-
def set_mapper_arg(self, data: Any, size: int) -> None:
185-
...
183+
def set_mapper_arg(self, data: Any, size: int) -> None: ...
186184

187185

188186
# todo: (bev) use list[...] when feasible

legate/core/communicator.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,13 @@ def destroy(self) -> None:
7474
self._handles = {}
7575

7676
@abstractproperty
77-
def needs_barrier(self) -> bool:
78-
...
77+
def needs_barrier(self) -> bool: ...
7978

8079
@abstractmethod
81-
def _initialize(self, volume: int) -> FutureMap:
82-
...
80+
def _initialize(self, volume: int) -> FutureMap: ...
8381

8482
@abstractmethod
85-
def _finalize(self, volume: int, handle: FutureMap) -> None:
86-
...
83+
def _finalize(self, volume: int, handle: FutureMap) -> None: ...
8784

8885

8986
class NCCLCommunicator(Communicator):

0 commit comments

Comments
 (0)