Skip to content

Commit 4324d77

Browse files
[STYLE] Suppress false PYL-W0212 (- WIP PR #371 -)
Changes in file multicast/recv.py: * added 'skipcq: PYL-W0212 - module ok' comments as needed
1 parent 58e7742 commit 4324d77

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

multicast/recv.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237

238238
_mcast_recv_lazy_bind_warning_message = "\n".join([
239239
"Lazy call to multicast.joinstep with unspecified bind group.",
240-
f"Will bind to {multicast._MCAST_DEFAULT_BIND_IP}.",
240+
f"Will bind to {multicast._MCAST_DEFAULT_BIND_IP}.", # skipcq: PYL-W0212 - module ok
241241
"Tip: Pass a value for bind_group to suppress this message",
242242
"(such as 'bind_group=multicast._MCAST_DEFAULT_BIND_IP')",
243243
])
@@ -279,7 +279,10 @@ def _validate_join_args(groups=None, port=None, iface=None, bind_group=None, iso
279279
groups = [bind_group]
280280
else:
281281
if __debug__ and not bind_group: # pragma: no branch
282-
if (len(groups) == 1) and (groups[0] != multicast._MCAST_DEFAULT_BIND_IP):
282+
# skipcq: PYL-W0212
283+
if (len(groups) == 1) and (
284+
groups[0] != multicast._MCAST_DEFAULT_BIND_IP # skipcq: PYL-W0212 - module ok
285+
):
283286
warnings.warn(
284287
_mcast_recv_lazy_bind_warning_message,
285288
category=ResourceWarning,
@@ -375,6 +378,7 @@ def joinstep(groups, port, iface=None, bind_group=None, isock=None):
375378
else:
376379
sock = isock.dup()
377380
try:
381+
# skipcq: PYL-W0212
378382
sock.bind((multicast._MCAST_DEFAULT_BIND_IP if bind_group is None else bind_group, port))
379383
for group in groups:
380384
mreq = _struct.pack(

0 commit comments

Comments
 (0)