mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-25 06:37:46 -06:00
* Resolve F541 errors * Resolve F841 errors * Resolve F811 errors * Resolve F901 errors * Resolve E714 errors * Ignore F821 errors for GraphQL mixins * Replace pycodestyle with ruff * Move ignores to ruff.toml
This commit is contained in:
@@ -95,7 +95,7 @@ class Command(BaseCommand):
|
||||
self.stdout.write("[*] Checking for latest release")
|
||||
if settings.ISOLATED_DEPLOYMENT:
|
||||
if options['verbosity']:
|
||||
self.stdout.write(f"\tSkipping: ISOLATED_DEPLOYMENT is enabled")
|
||||
self.stdout.write("\tSkipping: ISOLATED_DEPLOYMENT is enabled")
|
||||
elif settings.RELEASE_CHECK_URL:
|
||||
headers = {
|
||||
'Accept': 'application/vnd.github.v3+json',
|
||||
@@ -129,7 +129,7 @@ class Command(BaseCommand):
|
||||
self.stdout.write(f"\tRequest error: {exc}", self.style.ERROR)
|
||||
else:
|
||||
if options['verbosity']:
|
||||
self.stdout.write(f"\tSkipping: RELEASE_CHECK_URL not set")
|
||||
self.stdout.write("\tSkipping: RELEASE_CHECK_URL not set")
|
||||
|
||||
if options['verbosity']:
|
||||
self.stdout.write("Finished.", self.style.SUCCESS)
|
||||
|
||||
@@ -96,9 +96,9 @@ class Command(BaseCommand):
|
||||
if i:
|
||||
self.stdout.write(f'{i} entries cached.')
|
||||
else:
|
||||
self.stdout.write(f'No objects found.')
|
||||
self.stdout.write('No objects found.')
|
||||
|
||||
msg = f'Completed.'
|
||||
msg = 'Completed.'
|
||||
if total_count := search_backend.size:
|
||||
msg += f' Total entries: {total_count}'
|
||||
self.stdout.write(msg, self.style.SUCCESS)
|
||||
|
||||
@@ -51,7 +51,7 @@ class Command(BaseCommand):
|
||||
user = User.objects.filter(is_superuser=True).order_by('pk')[0]
|
||||
|
||||
# Setup logging to Stdout
|
||||
formatter = logging.Formatter(f'[%(asctime)s][%(levelname)s] - %(message)s')
|
||||
formatter = logging.Formatter('[%(asctime)s][%(levelname)s] - %(message)s')
|
||||
stdouthandler = logging.StreamHandler(sys.stdout)
|
||||
stdouthandler.setLevel(logging.DEBUG)
|
||||
stdouthandler.setFormatter(formatter)
|
||||
|
||||
Reference in New Issue
Block a user