Skip to content

Commit 30574f0

Browse files
committed
chore: enable ruff PT006/PT007 parametrize tuple rules
1 parent a7cefe9 commit 30574f0

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ select = [
161161
"SLF001",
162162
"PLR2004", # too many to fix right now
163163
"PT011", # too many to fix right now
164-
"PT006", # too many to fix right now
165164
"PGH003", # too many to fix right now
166-
"PT007", # too many to fix right now
167165
"PT027", # too many to fix right now
168166
"PLW0603" , # too many to fix right now
169167
"PLR0915", # too many to fix right now

tests/utils/test_name.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def test_service_type_name_overlong_full_name():
2828

2929

3030
@pytest.mark.parametrize(
31-
"instance_name, service_type",
32-
(
31+
("instance_name", "service_type"),
32+
[
3333
("CustomerInformationService-F4D4885E9EEB", "_ibisip_http._tcp.local."),
3434
("DeviceManagementService_F4D4885E9EEB", "_ibisip_http._tcp.local."),
35-
),
35+
],
3636
)
3737
def test_service_type_name_non_strict_compliant_names(instance_name, service_type):
3838
"""Test service_type_name for valid names, but not strict-compliant."""
@@ -62,16 +62,16 @@ def test_service_type_name_non_strict_compliant_names(instance_name, service_typ
6262

6363

6464
@pytest.mark.parametrize(
65-
"type_, expected",
66-
(
65+
("type_", "expected"),
66+
[
6767
("_http._tcp.LOCAL.", "_http._tcp.LOCAL."),
6868
("_http._TCP.local.", "_http._TCP.local."),
6969
("_HTTP._tcp.local.", "_HTTP._tcp.local."),
7070
("Instance._http._tcp.LOCAL.", "_http._tcp.LOCAL."),
7171
("_ntp._udp.LOCAL.", "_ntp._udp.LOCAL."),
7272
("_ntp._UDP.local.", "_ntp._UDP.local."),
7373
("Instance._ntp._udp.LOCAL.", "_ntp._udp.LOCAL."),
74-
),
74+
],
7575
)
7676
def test_service_type_name_uppercase_trailer(type_, expected):
7777
"""RFC 1035 §2.3.3 / RFC 6762 §16 — DNS names are case-insensitive."""

tests/utils/test_net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_normalize_interface_choice_errors():
131131

132132

133133
@pytest.mark.parametrize(
134-
"errno,expected_result",
134+
("errno", "expected_result"),
135135
[
136136
(errno.EADDRINUSE, False),
137137
(errno.EADDRNOTAVAIL, False),

0 commit comments

Comments
 (0)