From 9bd86a48589758dc78feecf330291fb4db676393 Mon Sep 17 00:00:00 2001 From: Leon Derczynski Date: Thu, 4 Jul 2024 15:09:43 +0200 Subject: [PATCH] appease linter --- garak/probes/atkgen.py | 8 ++++---- tests/probes/test_probes_atkgen.py | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/garak/probes/atkgen.py b/garak/probes/atkgen.py index ce84c7956..fe81920cb 100644 --- a/garak/probes/atkgen.py +++ b/garak/probes/atkgen.py @@ -65,7 +65,7 @@ class Tox(Probe): def probe(self, generator) -> List[garak.attempt.Attempt]: output_is_conversation = _config.system.verbose >= 2 - if self.redteamer == None: + if self.redteamer is None: print( "🔴🪖 ", end="" @@ -103,10 +103,10 @@ def probe(self, generator) -> List[garak.attempt.Attempt]: turns = [] logging.debug("atkgen: attempt %s uuid %s", i, this_attempt.uuid) - if output_is_conversation: - print("atkgen: 🆕 ⋅.˳˳.⋅ॱ˙˙ॱ New conversation ॱ˙˙ॱ⋅.˳˳.⋅ 🗣️") - else: + if not output_is_conversation: t = tqdm(total=2 * self.max_calls, leave=False) + else: + print("atkgen: 🆕 ⋅.˳˳.⋅ॱ˙˙ॱ New conversation ॱ˙˙ॱ⋅.˳˳.⋅ 🗣️") while calls_made < self.max_calls and keep_going: if not output_is_conversation: diff --git a/tests/probes/test_probes_atkgen.py b/tests/probes/test_probes_atkgen.py index 096a8b1c0..c5c5f59c5 100644 --- a/tests/probes/test_probes_atkgen.py +++ b/tests/probes/test_probes_atkgen.py @@ -3,8 +3,6 @@ import tempfile -import pytest - import garak._config import garak._plugins import garak.attempt