badwords: fix issues found in tests

There remain some false positives, hits in test data, and `dir` use,
around 100 issues in total.

There is no plan to enforce badwords on tests.

Also:
- badwords.txt: let a few `manpage[s]` occurrences through
  (in Perl code).

Closes #19541
This commit is contained in:
Viktor Szakats 2025-11-15 00:27:38 +01:00
parent f0de14168a
commit a87383828e
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
247 changed files with 594 additions and 595 deletions

View file

@ -66,7 +66,7 @@ class TestData(object):
self.data_folder = data_folder
def get_test_data(self, test_number):
# Create the test file name
# Create the test filename
filename = os.path.join(self.data_folder,
"test{0}".format(test_number))
@ -77,9 +77,9 @@ class TestData(object):
m = REPLY_DATA.search(contents)
if not m:
raise Exception("Couldn't find a <reply><data> section")
raise Exception("Could not find a <reply><data> section")
# Left-strip the data so we don't get a newline before our data.
# Left-strip the data so we do not get a newline before our data.
return m.group(1).lstrip()