Skip to content

Commit 5f23b8d

Browse files
fitzprromanlutz
andauthored
Apply suggestion from @romanlutz
Co-authored-by: Roman Lutz <romanlutz13@gmail.com>
1 parent c986e00 commit 5f23b8d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

pyrit/prompt_target/common/prompt_target.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,7 @@ def supported_input_modalities(self) -> "set[PromptDataType]":
225225
Returns:
226226
set[PromptDataType]: Set of all individual modalities that appear in any supported combination.
227227
"""
228-
all_modalities = set()
229-
supported_modalities = self.SUPPORTED_INPUT_MODALITIES # Works with both class attr and property
230-
for modality_set in supported_modalities:
231-
all_modalities.update(modality_set)
232-
return all_modalities
228+
return {frozenset(s) for s in self.SUPPORTED_INPUT_MODALITIES}
233229

234230
@property
235231
def supported_output_modalities(self) -> "set[PromptDataType]":

0 commit comments

Comments
 (0)