Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Maxim Zhiltsov <zhiltsov.max35@gmail.com>
  • Loading branch information
Bobronium and zhiltsov-max authored Sep 27, 2024
1 parent 3d3f843 commit 5f20d7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ def track_assignments(logger: logging.Logger) -> None:
def track_completed_escrows(logger: logging.Logger, session: Session) -> None:
awaiting_validations = cvat_service.create_escrow_validations(session)
logger.info(
f"{len(awaiting_validations)} escrow validations "
f"are in awaiting state: {awaiting_validations}"
f"Got {len(awaiting_validations)} new escrows"
f"awaiting validation: {format_list(awaiting_validations)}"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _export_escrow_annotations(
project_annotations_file = None
project_images = None
else:
# escrows with simple task types are ought to have only one project
# escrows with simple task types must have only one project
try:
(project,) = escrow_projects
except ValueError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def create_escrow_validations(session: Session):
return session.execute(insert_stmt).fetchall()


def get_escrows_for_validation(session: Session, limit=100) -> Sequence[tuple[str, str, int]]:
def get_escrows_for_validation(session: Session, *, limit: int = 100) -> Sequence[tuple[str, str, int]]:
subquery = (
select(EscrowValidation.id)
.where(EscrowValidation.status == EscrowValidationStatuses.awaiting)
Expand Down

0 comments on commit 5f20d7f

Please sign in to comment.