Minor cleanup.
PiperOrigin-RevId: 392982022
This commit is contained in:
parent
433b66b316
commit
9b48c81b6a
1 changed files with 4 additions and 4 deletions
|
@ -62,14 +62,14 @@ class DpEventBuilder(object):
|
||||||
"""Builds and returns the composed DpEvent represented by the builder."""
|
"""Builds and returns the composed DpEvent represented by the builder."""
|
||||||
if not self._composed_event:
|
if not self._composed_event:
|
||||||
self_composed_events = []
|
self_composed_events = []
|
||||||
for event, num_self_compositions in self._events.items():
|
for event, count in self._events.items():
|
||||||
if num_self_compositions == 1:
|
if count == 1:
|
||||||
self_composed_events.append(event)
|
self_composed_events.append(event)
|
||||||
else:
|
else:
|
||||||
self_composed_events.append(
|
self_composed_events.append(
|
||||||
dp_event.SelfComposedDpEvent(event, num_self_compositions))
|
dp_event.SelfComposedDpEvent(event, count))
|
||||||
if not self_composed_events:
|
if not self_composed_events:
|
||||||
return dp_event.NoOpDpEvent()
|
self._composed_event = dp_event.NoOpDpEvent()
|
||||||
elif len(self_composed_events) == 1:
|
elif len(self_composed_events) == 1:
|
||||||
self._composed_event = self_composed_events[0]
|
self._composed_event = self_composed_events[0]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue