Skip to content

Commit ef02615

Browse files
committed
chore: Delint
1 parent ecaf5fd commit ef02615

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

packages/toolbox-core/src/toolbox_core/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ def identify_required_authn_params(
7272
for param, services in req_authn_params.items():
7373
# if we don't have a token_getter for any of the services required by the param,
7474
# the param is still required
75-
matched_services = [
76-
s for s in services if s in auth_service_names
77-
]
75+
matched_services = [s for s in services if s in auth_service_names]
7876

7977
if matched_services:
8078
used_services.update(matched_services)

packages/toolbox-core/tests/test_utils.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ def test_identify_required_authn_params_none_required():
8888
auth_service_names = ["service_a", "service_b"]
8989
expected = {}
9090
expected_used = set()
91-
assert (
92-
identify_required_authn_params(req_authn_params, auth_service_names) == (expected, expected_used)
91+
assert identify_required_authn_params(req_authn_params, auth_service_names) == (
92+
expected,
93+
expected_used,
9394
)
9495

9596

@@ -102,8 +103,9 @@ def test_identify_required_authn_params_all_covered():
102103
auth_service_names = ["service_a", "service_b"]
103104
expected = {}
104105
expected_used = set(auth_service_names)
105-
assert (
106-
identify_required_authn_params(req_authn_params, auth_service_names) == (expected, expected_used)
106+
assert identify_required_authn_params(req_authn_params, auth_service_names) == (
107+
expected,
108+
expected_used,
107109
)
108110

109111

@@ -121,8 +123,9 @@ def test_identify_required_authn_params_some_covered():
121123
"token_e": ["service_e", "service_f"],
122124
}
123125
expected_used = set(auth_service_names)
124-
assert (
125-
identify_required_authn_params(req_authn_params, auth_service_names) == (expected, expected_used)
126+
assert identify_required_authn_params(req_authn_params, auth_service_names) == (
127+
expected,
128+
expected_used,
126129
)
127130

128131

@@ -138,8 +141,9 @@ def test_identify_required_authn_params_none_covered():
138141
"token_e": ["service_e", "service_f"],
139142
}
140143
expected_used = set()
141-
assert (
142-
identify_required_authn_params(req_authn_params, auth_service_names) == (expected, expected_used)
144+
assert identify_required_authn_params(req_authn_params, auth_service_names) == (
145+
expected,
146+
expected_used,
143147
)
144148

145149

@@ -155,8 +159,9 @@ def test_identify_required_authn_params_no_available_services():
155159
"token_b": ["service_b", "service_c"],
156160
}
157161
expected_used = set()
158-
assert (
159-
identify_required_authn_params(req_authn_params, auth_service_names) == (expected, expected_used)
162+
assert identify_required_authn_params(req_authn_params, auth_service_names) == (
163+
expected,
164+
expected_used,
160165
)
161166

162167

@@ -170,8 +175,9 @@ def test_identify_required_authn_params_empty_services_for_param():
170175
"token_x": [],
171176
}
172177
expected_used = set()
173-
assert (
174-
identify_required_authn_params(req_authn_params, auth_service_names) == (expected, expected_used)
178+
assert identify_required_authn_params(req_authn_params, auth_service_names) == (
179+
expected,
180+
expected_used,
175181
)
176182

177183

0 commit comments

Comments
 (0)