PEP8 cleanup

This commit is contained in:
Jeremy Stretch 2024-01-03 13:50:37 -05:00
parent 1f865af559
commit 8e20581da7
4 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ class Command(BaseCommand):
Draw a simple progress bar 20 increments wide illustrating the specified percentage.
"""
bar_size = int(percentage / 5)
self.stdout.write(f"\r [{'#' * bar_size}{' ' * (20-bar_size)}] {int(percentage)}%", ending='')
self.stdout.write(f"\r [{'#' * bar_size}{' ' * (20 - bar_size)}] {int(percentage)}%", ending='')
def handle(self, *model_names, **options):

View File

@ -222,7 +222,7 @@ class DeviceType(ImageAttachmentsMixin, PrimaryModel, WeightMixin):
@property
def get_full_name(self):
return f"{ self.manufacturer } { self.model }"
return f"{self.manufacturer} {self.model}"
def to_yaml(self):
data = {

View File

@ -2105,7 +2105,7 @@ class VirtualChassisTest(APIViewTestCases.APIViewTestCase):
for j in range(0, 13):
interfaces.append(
# Interface name starts with parent device's position in VC; e.g. 1/1, 1/2, 1/3...
Interface(device=device, name=f'{i%3+1}/{j}', type=InterfaceTypeChoices.TYPE_1GE_FIXED)
Interface(device=device, name=f'{i % 3 + 1}/{j}', type=InterfaceTypeChoices.TYPE_1GE_FIXED)
)
Interface.objects.bulk_create(interfaces)

View File

@ -264,9 +264,9 @@ class ObjectPermissionTest(
for i in range(3):
objectpermission = ObjectPermission(
name=f'Permission {i+1}',
name=f'Permission {i + 1}',
actions=['view', 'add', 'change', 'delete'],
constraints={'name': f'TEST{i+1}'}
constraints={'name': f'TEST{i + 1}'}
)
objectpermission.save()
objectpermission.object_types.add(object_type)