Skip to content

Commit 8bf17d0

Browse files
committed
Fix more formatting
1 parent 60fcc80 commit 8bf17d0

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

ophyd/status.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,10 @@ def __repr__(self):
610610
return "({self.left!r} & {self.right!r})".format(self=self)
611611

612612
def __str__(self):
613-
return "{0}(done={1.done}, success={1.success})".format(
614-
self.__class__.__name__, self
613+
return (
614+
"{0}(done={1.done}, "
615+
"success={1.success})"
616+
"".format(self.__class__.__name__, self)
615617
)
616618

617619
def __contains__(self, status: StatusBase) -> bool:
@@ -659,8 +661,11 @@ def __init__(self, obj=None, timeout=None, settle_time=0, done=None, success=Non
659661
self._trace_attributes["no_obj_given"] = not bool(obj)
660662

661663
def __str__(self):
662-
return "{0}(obj={1.obj}, done={1.done}, success={1.success})".format(
663-
self.__class__.__name__, self
664+
return (
665+
"{0}(obj={1.obj}, "
666+
"done={1.done}, "
667+
"success={1.success})"
668+
"".format(self.__class__.__name__, self)
664669
)
665670

666671
__repr__ = __str__
@@ -705,8 +710,10 @@ def _handle_failure(self):
705710

706711
def __str__(self):
707712
device_name = self.device.name if self.device else "None"
708-
return "{0}(device={2}, done={1.done}, success={1.success})".format(
709-
self.__class__.__name__, self, device_name
713+
return (
714+
"{0}(device={2}, done={1.done}, "
715+
"success={1.success})"
716+
"".format(self.__class__.__name__, self, device_name)
710717
)
711718

712719
def watch(self, func):

ophyd/tests/test_status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import time
2-
from unittest.mock import Mock, MagicMock
2+
from unittest.mock import MagicMock, Mock
33

44
import pytest
55

0 commit comments

Comments
 (0)