Configures ruff as the one stop linter and resolves warnings it raised

This commit is contained in:
Trenton H
2023-03-28 09:39:30 -07:00
parent 5869467db3
commit ce41ac9158
110 changed files with 507 additions and 491 deletions

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
import json
import logging
import os
@@ -390,8 +389,6 @@ class LibraryTagsCleaner(RegistryTagsCleaner):
will need their own logic
"""
pass
def _main():
parser = ArgumentParser(

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
import logging

1
.github/scripts/get-build-json.py vendored Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
"""
This is a helper script for the mutli-stage Docker image builder.
It provides a single point of configuration for package version control.

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
"""
This module contains some useful classes for interacting with the Github API.
The full documentation for the API can be found here: https://docs.github.com/en/rest
@@ -162,10 +161,7 @@ class ContainerPackage(_EndpointResponse):
Returns True if the image has at least one tag which matches the given regex,
False otherwise
"""
for tag in self.tags:
if re.match(pattern, tag) is not None:
return True
return False
return any(re.match(pattern, tag) is not None for tag in self.tags)
def __repr__(self):
return f"Package {self.name}"