gitlab-ci: upgrade "black" job to Trixie for improved fmt: skip

This commit is contained in:
Hans-Christoph Steiner
2025-12-02 10:01:04 +01:00
parent 3e8e9023f9
commit fe762978f1
4 changed files with 17 additions and 15 deletions

View File

@@ -428,7 +428,7 @@ locales:
black:
stage: lint
image: debian:bookworm-slim
image: debian:trixie-slim
<<: *apt-template
script:
- apt-get install black

View File

@@ -613,9 +613,9 @@ class BuildTest(unittest.TestCase):
with open(metadata_file) as fp:
app = fdroidserver.metadata.App(yaml.safe_load(fp))
app['RepoType'] = 'git'
app[
'Binaries'
] = 'https://example.com/fdroid/repo/info.guardianproject.checkey_%v.apk'
app['Binaries'] = (
'https://example.com/fdroid/repo/info.guardianproject.checkey_%v.apk'
)
build = fdroidserver.metadata.Build(
{
'versionCode': 123,
@@ -703,9 +703,9 @@ class BuildTest(unittest.TestCase):
with open(metadata_file) as fp:
app = fdroidserver.metadata.App(yaml.safe_load(fp))
app['RepoType'] = 'git'
app[
'Binaries'
] = 'https://example.com/fdroid/repo/info.guardianproject.checkey_%v.apk'
app['Binaries'] = (
'https://example.com/fdroid/repo/info.guardianproject.checkey_%v.apk'
)
build = fdroidserver.metadata.Build(
{
'versionCode': 123,

View File

@@ -309,7 +309,9 @@ class MetadataTest(unittest.TestCase):
def test_metadata_overrides_dot_fdroid_yml(self):
"""Fields in metadata files should override anything in .fdroid.yml."""
app = metadata.parse_metadata('metadata/info.guardianproject.urzip.yml')
self.assertEqual(app['Summary'], '一个实用工具,获取已安装在您的设备上的应用的有关信息')
self.assertEqual(
app['Summary'], '一个实用工具,获取已安装在您的设备上的应用的有关信息'
)
def test_dot_fdroid_yml_works_without_git(self):
"""Parsing should work if .fdroid.yml is present and it is not a git repo."""
@@ -487,9 +489,9 @@ class MetadataTest(unittest.TestCase):
yamldata = dict()
metadata.post_parse_yaml_metadata(yamldata)
yamldata[
'AllowedAPKSigningKeys'
] = 'c03dac71394d6c26766f1b04d3e31cfcac5d03b55d8aa40cc9b9fa6b74354c66'
yamldata['AllowedAPKSigningKeys'] = (
'c03dac71394d6c26766f1b04d3e31cfcac5d03b55d8aa40cc9b9fa6b74354c66'
)
metadata.post_parse_yaml_metadata(yamldata)
def test_post_parse_yaml_metadata_ArchivePolicy_int(self):
@@ -2076,7 +2078,7 @@ class MetadataTest(unittest.TestCase):
self.assertEqual(
metadata._format_stringmap('🔥', 'test', {'NonFree': {}, 'Ads': {'en': ''}}),
['Ads', 'NonFree'],
)
) # fmt: skip
def test_format_stringmap_three_list(self):
self.assertEqual(

View File

@@ -205,9 +205,9 @@ class PublishTest(unittest.TestCase):
publish.config['keystorepass'] = '123456'
publish.config['keypass'] = '654321'
publish.config['keystore'] = "keystore.jks"
publish.config[
'keydname'
] = 'CN=Birdman, OU=Cell, O=Alcatraz, L=Alcatraz, S=CA, C=US'
publish.config['keydname'] = (
'CN=Birdman, OU=Cell, O=Alcatraz, L=Alcatraz, S=CA, C=US'
)
os.chdir(self.testdir)
keystore = jks.KeyStore.new("jks", [])
keystore.save(publish.config['keystore'], publish.config['keystorepass'])