Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-komeili committed Sep 2, 2022
1 parent a8d9bf9 commit bc4a1f7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions mephisto/abstractions/providers/mturk/utils/script_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ def direct_assign_qual_mturk_workers(
requester = Requester.get(db, mturk_qual_details["requester_id"])
qualification_id = mturk_qual_details["mturk_qualification_id"]
else:
qualification_id = requester._create_new_mturk_qualification(
qual_name
)
qualification_id = requester._create_new_mturk_qualification(qual_name)

assert isinstance(
requester, MTurkRequester
Expand All @@ -57,10 +55,11 @@ def direct_assign_qual_mturk_workers(
mturk_client, worker_id, qualification_id, value=1
)
except Exception as e:
logger.exception(
logging.exception(
f'Failed to give worker with ID: "{worker_id}" qualification with error: {e}. Skipping.'
)


def direct_soft_block_mturk_workers(
db: "MephistoDB",
worker_list: List[str],
Expand All @@ -73,10 +72,12 @@ def direct_soft_block_mturk_workers(
in worker_list. If requester_name is not provided, it will use the
most recently registered mturk requester in the database.
"""
direct_assign_qual_mturk_workers(db=db,
direct_assign_qual_mturk_workers(
db=db,
worker_list=worker_list,
qual_name=soft_block_qual_name,
requester_name=requester_name)
requester_name=requester_name,
)


def get_mturk_ids_from_unit_id(db, unit_id: str) -> Dict[str, Optional[str]]:
Expand Down

0 comments on commit bc4a1f7

Please sign in to comment.