From e799f32d7160cd0943b72e648cc82eeb85ed3de8 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 31 Oct 2022 09:52:32 +0100 Subject: [PATCH 1/3] set black to format to py38 to support Debian/bullseye package Debian/bullseye (stable) includes black v20.8b1, which does not yet know about the py39 target-version. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 558596e9..9e7fc078 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] skip-string-normalization = true -target-version = ["py39"] +target-version = ["py38"] [tool.mypy] From 99e0c28d37485f37ce6c5c870bc1bed56a983770 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 31 Oct 2022 09:54:45 +0100 Subject: [PATCH 2/3] run black on tests/updates.TestCase to fix lint failure --- tests/update.TestCase | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/update.TestCase b/tests/update.TestCase index a46b0fb9..12380d1b 100755 --- a/tests/update.TestCase +++ b/tests/update.TestCase @@ -102,28 +102,27 @@ class UpdateTest(unittest.TestCase): repo_dir = os.path.join(self.basedir, 'repo') os.mkdir('metadata') for packageName in ( - 'obb.mainpatch.current', - 'org.videolan.vlc', + 'obb.mainpatch.current', + 'org.videolan.vlc', ): shutil.copytree( - os.path.join(repo_dir, packageName), - os.path.join('repo', packageName) + os.path.join(repo_dir, packageName), os.path.join('repo', packageName) ) for packageName in ( - 'info.guardianproject.checkey', - 'info.guardianproject.urzip', - 'org.smssecure.smssecure', + 'info.guardianproject.checkey', + 'info.guardianproject.urzip', + 'org.smssecure.smssecure', ): if not os.path.exists('metadata'): os.mkdir('metadata') shutil.copytree( os.path.join(self.basedir, 'metadata', packageName), - os.path.join('metadata', packageName) + os.path.join('metadata', packageName), ) for packageName in ( - 'com.nextcloud.client', - 'com.nextcloud.client.dev', - 'eu.siacs.conversations', + 'com.nextcloud.client', + 'com.nextcloud.client.dev', + 'eu.siacs.conversations', ): shutil.copytree( os.path.join(self.basedir, 'source-files', packageName), @@ -255,7 +254,6 @@ class UpdateTest(unittest.TestCase): fdroidserver.update.insert_localized_app_metadata(apps) self.assertEqual('42', apps[app.id]['localized']['en-US']['whatsNew']) - def test_name_title_scraping(self): """metadata file --> fdroiddata localized files --> fastlane/triple-t in app source --> APK""" config = dict() @@ -360,7 +358,7 @@ class UpdateTest(unittest.TestCase): appid = 'info.guardianproject.checkey' testapps = {appid: copy.copy(apps[appid])} self.assertEqual('Checkey the app!', testapps[appid]['Name']) - del (testapps[appid]['Name']) + del testapps[appid]['Name'] fdroidserver.update.insert_missing_app_names_from_apks(testapps, apks) self.assertIsNone(testapps[appid].get('Name')) From 97f3e78fa80a2e59b21181d4d6a5b4c25739ca05 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 31 Oct 2022 10:05:40 +0100 Subject: [PATCH 3/3] fixup from 8b484b37bd51 in !1240 --- MANIFEST.in | 1 + tests/repo/index-v1.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 6415d387..297dae0b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -596,6 +596,7 @@ include tests/metadata/info.guardianproject.checkey/en-US/summary.txt include tests/metadata/info.guardianproject.checkey/ja-JP/name.txt include tests/metadata/info.guardianproject.checkey.yml include tests/metadata/info.guardianproject.urzip/en-US/changelogs/100.txt +include tests/metadata/info.guardianproject.urzip/en-US/changelogs/default.txt include tests/metadata/info.guardianproject.urzip/en-US/full_description.txt include tests/metadata/info.guardianproject.urzip/en-US/images/featureGraphic.png include tests/metadata/info.guardianproject.urzip/en-US/images/icon.png diff --git a/tests/repo/index-v1.json b/tests/repo/index-v1.json index 409f333a..257a815d 100644 --- a/tests/repo/index-v1.json +++ b/tests/repo/index-v1.json @@ -221,7 +221,8 @@ "icon": "icon_NJXNzMcyf-v9i5a1ElJi0j9X1LvllibCa48xXYPlOqQ=.png", "name": "title", "summary": "short description", - "video": "video" + "video": "video", + "whatsNew": "default" } } }