From e439d2a00112c3323feea05dd9caf7be9800d0e3 Mon Sep 17 00:00:00 2001 From: Gregoo Date: Mon, 27 Jan 2025 12:04:20 +0100 Subject: [PATCH] Remove confusing reference to number for sets --- bricktracker/set.py | 24 ++++++++++++------------ bricktracker/wish.py | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bricktracker/set.py b/bricktracker/set.py index 3e348e9..523d336 100644 --- a/bricktracker/set.py +++ b/bricktracker/set.py @@ -41,8 +41,8 @@ class BrickSet(RebrickableSet): try: # Insert into the database self.socket.auto_progress( - message='Set {number}: inserting into database'.format( - number=self.fields.set + message='Set {set}: inserting into database'.format( + set=self.fields.set ), increment_total=True, ) @@ -64,8 +64,8 @@ class BrickSet(RebrickableSet): # Commit the transaction to the database self.socket.auto_progress( - message='Set {number}: writing to the database'.format( - number=self.fields.set + message='Set {set}: writing to the database'.format( + set=self.fields.set ), increment_total=True, ) @@ -73,15 +73,15 @@ class BrickSet(RebrickableSet): BrickSQL().commit() # Info - logger.info('Set {number}: imported (id: {id})'.format( - number=self.fields.set, + logger.info('Set {set}: imported (id: {id})'.format( + set=self.fields.set, id=self.fields.id, )) # Complete self.socket.complete( - message='Set {number}: imported (Go to the set)'.format( # noqa: E501 - number=self.fields.set, + message='Set {set}: imported (Go to the set)'.format( # noqa: E501 + set=self.fields.set, url=self.url() ), download=True @@ -89,8 +89,8 @@ class BrickSet(RebrickableSet): except Exception as e: self.socket.fail( - message='Error while importing set {number}: {error}'.format( - number=self.fields.set, + message='Error while importing set {set}: {error}'.format( + set=self.fields.set, error=e, ) ) @@ -155,9 +155,9 @@ class BrickSet(RebrickableSet): ) if rows != 1: - raise DatabaseException('Could not update the status "{status}" for set {number} ({id})'.format( # noqa: E501 + raise DatabaseException('Could not update the status "{status}" for set {set} ({id})'.format( # noqa: E501 status=checkbox.fields.name, - number=self.fields.set, + set=self.fields.set, id=self.fields.id, )) diff --git a/bricktracker/wish.py b/bricktracker/wish.py index 1e301fa..def41e2 100644 --- a/bricktracker/wish.py +++ b/bricktracker/wish.py @@ -31,8 +31,8 @@ class BrickWish(RebrickableSet): # Load from database if not self.select(): raise NotFoundException( - 'Wish with number {number} was not found in the database'.format( # noqa: E501 - number=self.fields.set, + 'Wish for set {set} was not found in the database'.format( # noqa: E501 + set=self.fields.set, ), )