Skip to content

Commit 0f9f1b6

Browse files
author
BiffoBear
committed
Changed the order of decorators on properties.
1 parent 03bdc33 commit 0f9f1b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_socket.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def __exit__(self, exc_type, exc_val, exc_tb) -> None:
252252
if time.monotonic() - stamp > 1000:
253253
raise RuntimeError("Failed to close socket")
254254

255-
# This works around problems with using a method as a decorator.
255+
# This works around problems with using a class method as a decorator.
256256
def _check_socket_closed(func): # pylint: disable=no-self-argument
257257
"""Decorator to check whether the socket object has been closed."""
258258

@@ -697,20 +697,20 @@ def getblocking(self) -> bool:
697697
"""
698698
return self.gettimeout() == 0
699699

700-
@_check_socket_closed
701700
@property
701+
@_check_socket_closed
702702
def family(self) -> int:
703703
"""Socket family (always 0x03 in this implementation)."""
704704
return 3
705705

706-
@_check_socket_closed
707706
@property
707+
@_check_socket_closed
708708
def type(self):
709709
"""Socket type."""
710710
return self._sock_type
711711

712-
@_check_socket_closed
713712
@property
713+
@_check_socket_closed
714714
def proto(self):
715715
"""Socket protocol (always 0x00 in this implementation)."""
716716
return 0

0 commit comments

Comments
 (0)