From ba063383d6053544f66a040872addbf3c68ba0a3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Sep 2024 13:54:42 +0100 Subject: [PATCH] Less indentation --- poison.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poison.py b/poison.py index f32ac6ced..ce267d787 100644 --- a/poison.py +++ b/poison.py @@ -1054,10 +1054,10 @@ def html_poisoned(dictionary: [], twograms: {}) -> str: pair_found = False if prev_wrd: # common word sequences - if twograms.get(prev_wrd): - if randint(1, 10) <= 7: - wrd = random.choice(twograms[prev_wrd]) - pair_found = True + if twograms.get(prev_wrd) and \ + randint(1, 10) <= 7: + wrd = random.choice(twograms[prev_wrd]) + pair_found = True if not pair_found: if randint(1, 10) <= 7: