Skip to content

Commit f8c01a7

Browse files
author
ushiboy
committed
Add workaround for Pylint v2 and v4
1 parent 5d1f45b commit f8c01a7

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

.pylintrc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,7 @@ logging-modules=logging
425425
# Only show warnings with the listed confidence levels. Leave empty to show
426426
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
427427
# UNDEFINED.
428-
confidence=HIGH,
429-
CONTROL_FLOW,
430-
INFERENCE,
431-
INFERENCE_FAILURE,
432-
UNDEFINED
428+
confidence=
433429

434430
# Disable the message, report, category or checker with the given id(s). You
435431
# can either give multiple identifiers separated by comma (,) or put this
@@ -461,7 +457,8 @@ disable=raw-checker-failed,
461457
too-many-instance-attributes,
462458
broad-exception-caught,
463459
no-member,
464-
fixme
460+
fixme,
461+
bad-option-value
465462

466463
# Enable the message, report, category or checker with the given id(s). You can
467464
# either give multiple identifier separated by comma (,) or put this option

nmcli/_device.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ def parse_wifi_hotspot_result(text: str) -> Tuple[str, str, str]:
1717
if m:
1818
ifname, uuid = m.groups()
1919
# TODO: Handle case when regex doesn't match - variables may be undefined
20-
return (uuid, ifname, password) # pylint: disable=possibly-used-before-assignment
20+
# pylint: disable=used-before-assignment,possibly-used-before-assignment
21+
return (uuid, ifname, password)
2122

2223

2324
def parse_hotspot_properties(text: str) -> Tuple[str, str]:
@@ -33,7 +34,8 @@ def parse_hotspot_properties(text: str) -> Tuple[str, str]:
3334
elif key == '802-11-wireless.ssid':
3435
ssid = value
3536
# TODO: Handle case when required keys are not found - variables may be undefined
36-
return (con_name, ssid) # pylint: disable=possibly-used-before-assignment,used-before-assignment
37+
# pylint: disable=used-before-assignment,possibly-used-before-assignment
38+
return (con_name, ssid)
3739

3840

3941
class DeviceControlInterface:

0 commit comments

Comments
 (0)