@@ -96,7 +96,9 @@ def reset(self, required: bool = False) -> bool:
96
96
raise OneWireError ("No presence pulse found. Check devices and wiring." )
97
97
return not reset
98
98
99
- def readinto (self , buf : bytearray , * , start : int = 0 , end : Optional [int ] = None ) -> None :
99
+ def readinto (
100
+ self , buf : bytearray , * , start : int = 0 , end : Optional [int ] = None
101
+ ) -> None :
100
102
"""
101
103
Read into ``buf`` from the device. The number of bytes read will be the
102
104
length of ``buf``.
@@ -114,7 +116,9 @@ def readinto(self, buf: bytearray, *, start: int = 0, end: Optional[int] = None)
114
116
for i in range (start , end ):
115
117
buf [i ] = self ._readbyte ()
116
118
117
- def write (self , buf : bytearray , * , start : int = 0 , end : Optional [int ] = None ) -> None :
119
+ def write (
120
+ self , buf : bytearray , * , start : int = 0 , end : Optional [int ] = None
121
+ ) -> None :
118
122
"""
119
123
Write the bytes from ``buf`` to the device.
120
124
@@ -163,7 +167,9 @@ def _writebyte(self, value: int) -> None:
163
167
bit = (value >> i ) & 0x1
164
168
self ._ow .write_bit (bit )
165
169
166
- def _search_rom (self , l_rom : Optional [bytearray ], diff : int ) -> Tuple [bytearray , int ]:
170
+ def _search_rom (
171
+ self , l_rom : Optional [bytearray ], diff : int
172
+ ) -> Tuple [bytearray , int ]:
167
173
if not self .reset ():
168
174
return None , 0
169
175
self ._writebyte (_SEARCH_ROM )
0 commit comments