Remove confusing reference to number for sets

This commit is contained in:
Gregoo 2025-01-27 12:04:20 +01:00
parent 7094015976
commit e439d2a001
2 changed files with 14 additions and 14 deletions

View File

@ -41,8 +41,8 @@ class BrickSet(RebrickableSet):
try: try:
# Insert into the database # Insert into the database
self.socket.auto_progress( self.socket.auto_progress(
message='Set {number}: inserting into database'.format( message='Set {set}: inserting into database'.format(
number=self.fields.set set=self.fields.set
), ),
increment_total=True, increment_total=True,
) )
@ -64,8 +64,8 @@ class BrickSet(RebrickableSet):
# Commit the transaction to the database # Commit the transaction to the database
self.socket.auto_progress( self.socket.auto_progress(
message='Set {number}: writing to the database'.format( message='Set {set}: writing to the database'.format(
number=self.fields.set set=self.fields.set
), ),
increment_total=True, increment_total=True,
) )
@ -73,15 +73,15 @@ class BrickSet(RebrickableSet):
BrickSQL().commit() BrickSQL().commit()
# Info # Info
logger.info('Set {number}: imported (id: {id})'.format( logger.info('Set {set}: imported (id: {id})'.format(
number=self.fields.set, set=self.fields.set,
id=self.fields.id, id=self.fields.id,
)) ))
# Complete # Complete
self.socket.complete( self.socket.complete(
message='Set {number}: imported (<a href="{url}">Go to the set</a>)'.format( # noqa: E501 message='Set {set}: imported (<a href="{url}">Go to the set</a>)'.format( # noqa: E501
number=self.fields.set, set=self.fields.set,
url=self.url() url=self.url()
), ),
download=True download=True
@ -89,8 +89,8 @@ class BrickSet(RebrickableSet):
except Exception as e: except Exception as e:
self.socket.fail( self.socket.fail(
message='Error while importing set {number}: {error}'.format( message='Error while importing set {set}: {error}'.format(
number=self.fields.set, set=self.fields.set,
error=e, error=e,
) )
) )
@ -155,9 +155,9 @@ class BrickSet(RebrickableSet):
) )
if rows != 1: 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, status=checkbox.fields.name,
number=self.fields.set, set=self.fields.set,
id=self.fields.id, id=self.fields.id,
)) ))

View File

@ -31,8 +31,8 @@ class BrickWish(RebrickableSet):
# Load from database # Load from database
if not self.select(): if not self.select():
raise NotFoundException( raise NotFoundException(
'Wish with number {number} was not found in the database'.format( # noqa: E501 'Wish for set {set} was not found in the database'.format( # noqa: E501
number=self.fields.set, set=self.fields.set,
), ),
) )