mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Configures ruff as the one stop linter and resolves warnings it raised
This commit is contained in:
3
.github/scripts/cleanup-tags.py
vendored
3
.github/scripts/cleanup-tags.py
vendored
@@ -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(
|
||||
|
1
.github/scripts/common.py
vendored
1
.github/scripts/common.py
vendored
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python3
|
||||
import logging
|
||||
|
||||
|
||||
|
1
.github/scripts/get-build-json.py
vendored
Executable file → Normal file
1
.github/scripts/get-build-json.py
vendored
Executable file → Normal 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.
|
||||
|
6
.github/scripts/github.py
vendored
6
.github/scripts/github.py
vendored
@@ -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}"
|
||||
|
Reference in New Issue
Block a user