Skip to content

Commit 5a4cee3

Browse files
author
BiffoBear
committed
Final edit.
1 parent 42ea3fb commit 5a4cee3

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

adafruit_wiznet5k/adafruit_wiznet5k.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,16 @@ def chip(self) -> str:
289289
"""
290290
Ethernet controller chip type.
291291
292-
:return str: The chip type."""
292+
:return str: The chip type.
293+
"""
293294
return self._chip_type
294295

295296
@property
296297
def ip_address(self) -> bytearray:
297298
"""
298299
Configured IP address.
299300
300-
:return bytearray.
301+
:return bytearray: IP address as four bytes.
301302
"""
302303
return self.read(REG_SIPR, 0x00, 4)
303304

@@ -307,7 +308,7 @@ def pretty_ip(
307308
ip: bytearray,
308309
) -> str:
309310
"""
310-
Convert a bytearray IP address to a dotted-quad string for printing.
311+
Convert a 4 byte IP address to a dotted-quad string for printing.
311312
312313
:param bytearray ip: A four byte IP address.
313314
@@ -323,9 +324,9 @@ def unpretty_ip(
323324
"""
324325
Convert a dotted-quad string to a four byte IP address.
325326
326-
:param str ip: The IP address (a string of the form '255.255.255.255') to be converted.
327+
:param str ip: IP address (a string of the form '255.255.255.255') to be converted.
327328
328-
:return bytes: The IP address in four bytes.
329+
:return bytes: IP address in four bytes.
329330
"""
330331
octets = [int(x) for x in ip.split(".")]
331332
return bytes(octets)
@@ -335,7 +336,7 @@ def mac_address(self) -> bytearray:
335336
"""
336337
Ethernet hardware's MAC address.
337338
338-
:return bytearray: The six byte MAC address."""
339+
:return bytearray: Six byte MAC address."""
339340
return self.read(REG_SHAR, 0x00, 6)
340341

341342
@mac_address.setter
@@ -374,7 +375,7 @@ def remote_ip(self, socket_num: int) -> Union[str, bytearray]:
374375
375376
:param int socket_num: ID number of the socket to check.
376377
377-
:return Union[str, bytearray]: The four byte IP address.
378+
:return Union[str, bytearray]: A four byte IP address.
378379
"""
379380
if socket_num >= self.max_sockets:
380381
return self._pbuff
@@ -553,7 +554,7 @@ def read(
553554
:param int length: Number of bytes to read from the register, defaults to 1.
554555
:param Optional[WriteableBuffer] buffer: Buffer to read data into, defaults to None.
555556
556-
:return Union[WriteableBuffer, bytearray]: The data read from the chip.
557+
:return Union[WriteableBuffer, bytearray]: Data read from the chip.
557558
"""
558559
with self._device as bus_device:
559560
if self._chip_type == "w5500":
@@ -609,6 +610,7 @@ def socket_available(self, socket_num: int, sock_type: int = SNMR_TCP) -> int:
609610
:param int socket_num: Socket to check for available bytes.
610611
:param int sock_type: Socket type. Use SNMR_TCP for TCP or SNMR_UDP for UDP, \
611612
defaults to SNMR_TCP.
613+
612614
:return int: Number of bytes available to read.
613615
"""
614616
if self._debug:

adafruit_wiznet5k/adafruit_wiznet5k_socket.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,8 @@ def readline(self) -> bytes:
539539
"""
540540
Read a line from the socket.
541541
542-
Attempt to return as many bytes as we can up to but not including carriage return and
543-
linefeed charater pairs.
542+
Attempt to return as many bytes as we can up to but not including a carriage return and
543+
linefeed charater pair.
544544
545545
:return bytes: The data read from the socket.
546546
"""

adafruit_wiznet5k/adafruit_wiznet5k_wsgiserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def _get_environ(self, client: socket.socket) -> Dict:
180180
The application callable will be given the resulting environ dictionary.
181181
It contains metadata about the incoming request and the request body ("wsgi.input")
182182
183-
:param socket.socket client: socket to read the request from.
183+
:param socket.socket client: Socket to read the request from.
184184
185185
:return Dict: Data for the application callable.
186186
"""

0 commit comments

Comments
 (0)