chore: fix flake8 warnings in haiku and test_haiku

Refs: OPS-70
This commit is contained in:
Christoph J. Scherr 2025-03-21 16:47:47 +01:00
parent 3889809d07
commit df6e964751
No known key found for this signature in database
GPG key ID: 9EB784BB202BB7BB
2 changed files with 2 additions and 4 deletions

View file

@ -48,11 +48,11 @@ class Haiku:
if len(lines) < 3: if len(lines) < 3:
if tries < 20: if tries < 20:
logging.warning(f"too few lines, trying again") logging.warning("too few lines, trying again")
logging.debug(lines) logging.debug(lines)
continue continue
else: else:
logging.warning(f"too many tries, aborting") logging.warning("too many tries, aborting")
raise Exception( raise Exception(
"Generating the haiku took too many tries") "Generating the haiku took too many tries")

View file

@ -5,14 +5,12 @@ from __future__ import annotations
import os import os
import json import json
import logging
from pytest_httpserver import HTTPServer from pytest_httpserver import HTTPServer
# do not remove this import. This is needed for # do not remove this import. This is needed for
# pytest fixtures to work # pytest fixtures to work
import pytest # noqa: F401 import pytest # noqa: F401
import senju
from senju.haiku import Haiku # noqa: F401 from senju.haiku import Haiku # noqa: F401
# Note: these weird arguments are an indicator of what should be dome # Note: these weird arguments are an indicator of what should be dome