aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuppie2026-09-19 16:17:43 -0600
committerstuppie2026-09-19 16:17:43 -0600
commit6249139ee928b954e74ac42df81211f1a8094b53 (patch)
treea8e92617a2a6360c470b19945c9ac9390bfcbc27
parent4b331798c78f3adb12a69882cfa9a115cb3704ac (diff)
downloadamt-jb-6249139ee928b954e74ac42df81211f1a8094b53.tar.gz
amt-jb-6249139ee928b954e74ac42df81211f1a8094b53.zip
fix prev commit
-rw-r--r--jb/managers/amt.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/jb/managers/amt.py b/jb/managers/amt.py
index cb77e16..488bbb8 100644
--- a/jb/managers/amt.py
+++ b/jb/managers/amt.py
@@ -1,3 +1,4 @@
+import logging
from datetime import datetime, timezone
from typing import Any
@@ -14,13 +15,14 @@ from mypy_boto3_mturk.type_defs import (
from pydantic import ValidationError
from jb.config import TOPIC_ARN
-from jb.decorators import LOG
from jb.models.amt import AMTAccount
from jb.models.assignment import Assignment
from jb.models.bonus import Bonus
from jb.models.definitions import HitStatus
from jb.models.hit import Hit, HitQuestion, HitType
+LOG = logging.getLogger("amtjb")
+
REJECT_MESSAGE_UNKNOWN_ASSIGNMENT = "Unknown assignment"
REJECT_MESSAGE_NO_WORK = "Assignment was submitted with no attempted work."
REJECT_MESSAGE_BADDIE = "Quality has dropped below an acceptable level"
@@ -86,7 +88,9 @@ class AMTManager:
def create_hit_type(self, hit_type: HitType) -> HitType:
assert hit_type.amt_hit_type_id is None
- res: CreateHITTypeResponseTypeDef = self.amt_client.create_hit_type(**hit_type.to_api_request_body()) # type: ignore
+ res: CreateHITTypeResponseTypeDef = self.amt_client.create_hit_type(
+ **hit_type.to_api_request_body()
+ ) # type: ignore
hit_type.amt_hit_type_id = res["HITTypeId"]
@@ -234,9 +238,9 @@ class AMTManager:
AssignmentId=amt_assignment_id
)["BonusPayments"]
- assert (
- len(res) <= 1
- ), f"{amt_assignment_id=} Expected 1 or 0 bonuses, got {len(res)}"
+ assert len(res) <= 1, (
+ f"{amt_assignment_id=} Expected 1 or 0 bonuses, got {len(res)}"
+ )
d = res[0] if res else None
if d: