mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-06 23:05:42 +01:00
Configures ruff as the one stop linter and resolves warnings it raised
This commit is contained in:
parent
5869467db3
commit
ce41ac9158
110 changed files with 507 additions and 491 deletions
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}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue