mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-20 13:50:12 +01:00
Merge branch 'fix-ci' into 'master'
fix CI See merge request fdroid/fdroidserver!1288
This commit is contained in:
commit
7f1e96fe63
@ -220,9 +220,10 @@ lint_format_safety_bandit_checks:
|
|||||||
|
|
||||||
|
|
||||||
black:
|
black:
|
||||||
image: python:slim
|
image: debian:bookworm-slim
|
||||||
|
<<: *apt-template
|
||||||
script:
|
script:
|
||||||
- pip install black
|
- apt-get install black
|
||||||
- black --check --diff --color
|
- black --check --diff --color
|
||||||
examples/fdroid_clean_repos.py
|
examples/fdroid_clean_repos.py
|
||||||
examples/fdroid_extract_repo_pubkey.py
|
examples/fdroid_extract_repo_pubkey.py
|
||||||
|
7
.safety-policy.yml
Normal file
7
.safety-policy.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
security:
|
||||||
|
ignore-vulnerabilities:
|
||||||
|
52495:
|
||||||
|
reason: setuptools comes from Debian
|
||||||
|
expires: '2025-01-31'
|
@ -159,7 +159,6 @@ def main():
|
|||||||
output = 'git commit ' + subprocess.check_output(['git', 'rev-parse', 'HEAD'],
|
output = 'git commit ' + subprocess.check_output(['git', 'rev-parse', 'HEAD'],
|
||||||
universal_newlines=True)
|
universal_newlines=True)
|
||||||
elif os.path.exists('setup.py'):
|
elif os.path.exists('setup.py'):
|
||||||
import re
|
|
||||||
m = re.search(r'''.*[\s,\(]+version\s*=\s*["']([0-9a-z.]+)["'].*''',
|
m = re.search(r'''.*[\s,\(]+version\s*=\s*["']([0-9a-z.]+)["'].*''',
|
||||||
open('setup.py').read(), flags=re.MULTILINE)
|
open('setup.py').read(), flags=re.MULTILINE)
|
||||||
if m:
|
if m:
|
||||||
|
@ -430,12 +430,12 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
|||||||
repo.index.commit("fdroidserver git-mirror")
|
repo.index.commit("fdroidserver git-mirror")
|
||||||
|
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
bar = progress.Bar()
|
progressbar = progress.Bar()
|
||||||
|
|
||||||
class MyProgressPrinter(git.RemoteProgress):
|
class MyProgressPrinter(git.RemoteProgress):
|
||||||
def update(self, op_code, current, maximum=None, message=None):
|
def update(self, op_code, current, maximum=None, message=None):
|
||||||
if isinstance(maximum, float):
|
if isinstance(maximum, float):
|
||||||
bar.show(current, maximum)
|
progressbar.show(current, maximum)
|
||||||
progress = MyProgressPrinter()
|
progress = MyProgressPrinter()
|
||||||
else:
|
else:
|
||||||
progress = None
|
progress = None
|
||||||
@ -497,7 +497,7 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
|||||||
logging.debug(remote.url + ': ' + pushinfo.summary)
|
logging.debug(remote.url + ': ' + pushinfo.summary)
|
||||||
|
|
||||||
if progress:
|
if progress:
|
||||||
bar.done()
|
progressbar.done()
|
||||||
|
|
||||||
|
|
||||||
def upload_to_android_observatory(repo_section):
|
def upload_to_android_observatory(repo_section):
|
||||||
|
@ -252,7 +252,7 @@ def main():
|
|||||||
tmp_importer_dir = None
|
tmp_importer_dir = None
|
||||||
|
|
||||||
local_metadata_files = common.get_local_metadata_files()
|
local_metadata_files = common.get_local_metadata_files()
|
||||||
if local_metadata_files != []:
|
if local_metadata_files:
|
||||||
raise FDroidException(_("This repo already has local metadata: %s") % local_metadata_files[0])
|
raise FDroidException(_("This repo already has local metadata: %s") % local_metadata_files[0])
|
||||||
|
|
||||||
build = metadata.Build()
|
build = metadata.Build()
|
||||||
|
@ -323,7 +323,7 @@ class FDroidBuildVm:
|
|||||||
boxfile = abspath(boxfile)
|
boxfile = abspath(boxfile)
|
||||||
if not isfile(boxfile):
|
if not isfile(boxfile):
|
||||||
raise FDroidBuildVmException(
|
raise FDroidBuildVmException(
|
||||||
'supplied boxfile \'%s\' does not exist', boxfile
|
'supplied boxfile \'%s\' does not exist' % boxfile
|
||||||
)
|
)
|
||||||
self.vgrnt.box_add(boxname, abspath(boxfile), force=force)
|
self.vgrnt.box_add(boxname, abspath(boxfile), force=force)
|
||||||
|
|
||||||
|
@ -49,7 +49,27 @@ confidence = ["HIGH", "INFERENCE"]
|
|||||||
# --enable=similarities". If you want to run only the classes checker, but have
|
# --enable=similarities". If you want to run only the classes checker, but have
|
||||||
# no Warning level messages displayed, use "--disable=all --enable=classes
|
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||||
# --disable=W".
|
# --disable=W".
|
||||||
disable = ["invalid-name", "missing-module-docstring", "missing-class-docstring", "missing-function-docstring", "no-member"]
|
|
||||||
|
# TODO many of these could be fixed if someone wants to spend the time
|
||||||
|
disable = [
|
||||||
|
"broad-exception-caught",
|
||||||
|
"broad-exception-raised",
|
||||||
|
"consider-iterating-dictionary",
|
||||||
|
"consider-using-sys-exit",
|
||||||
|
"invalid-name",
|
||||||
|
"missing-class-docstring",
|
||||||
|
"missing-function-docstring",
|
||||||
|
"missing-module-docstring",
|
||||||
|
"no-else-break",
|
||||||
|
"no-else-continue",
|
||||||
|
"no-else-raise",
|
||||||
|
"no-else-return",
|
||||||
|
"no-member",
|
||||||
|
"pointless-exception-statement",
|
||||||
|
"subprocess-run-check",
|
||||||
|
"use-dict-literal",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
[tool.pylint.miscellaneous]
|
[tool.pylint.miscellaneous]
|
||||||
# List of note tags to take in consideration, separated by a comma.
|
# List of note tags to take in consideration, separated by a comma.
|
||||||
|
@ -1358,7 +1358,7 @@ class UpdateTest(unittest.TestCase):
|
|||||||
|
|
||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
icons_src = fdroidserver.update._get_apk_icons_src('urzip-release.apk', None)
|
icons_src = fdroidserver.update._get_apk_icons_src('urzip-release.apk', None)
|
||||||
assert icons_src == {}
|
assert not icons_src
|
||||||
|
|
||||||
def test_strip_and_copy_image(self):
|
def test_strip_and_copy_image(self):
|
||||||
tmptestsdir = tempfile.mkdtemp(
|
tmptestsdir = tempfile.mkdtemp(
|
||||||
|
Loading…
Reference in New Issue
Block a user