From 675bb83ccd6efaf91a1fb731780bb9add7d20305 Mon Sep 17 00:00:00 2001 From: Kavya Barangi Date: Sun, 3 May 2026 12:57:01 +0530 Subject: [PATCH 1/8] Fix: Resolve E501 line too long in test_signing.py --- tests/platforms/macOS/app/test_signing.py | 123 ++++++++++++++++------ 1 file changed, 92 insertions(+), 31 deletions(-) diff --git a/tests/platforms/macOS/app/test_signing.py b/tests/platforms/macOS/app/test_signing.py index a8b85dc387..7947594b45 100644 --- a/tests/platforms/macOS/app/test_signing.py +++ b/tests/platforms/macOS/app/test_signing.py @@ -102,8 +102,12 @@ def test_explicit_app_identity_checksum(dummy_command): """If the user nominates an app identity by checksum, it is used.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # The identity will be the one the user specified as an option. @@ -122,8 +126,12 @@ def test_explicit_app_identity_name(dummy_command): """If the user nominates an app identity by name, it is used.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # The identity will be the one the user specified as an option. @@ -142,8 +150,12 @@ def test_invalid_app_identity_name(dummy_command): """If the user nominates an app identity by name, it is used.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # The identity will be the one the user specified as an option. @@ -198,8 +210,12 @@ def test_select_app_identity(dummy_command): """The user can select from a list of app identities.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # Return option 3 @@ -221,8 +237,12 @@ def test_select_app_identity_no_adhoc(dummy_command): """Adhoc identities can be excluded from the list of options.""" # get_identities will return some options. dummy_command.get_identities.return_value = { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), } # Return option 2 @@ -248,13 +268,21 @@ def test_select_installer_identity(dummy_command): dummy_command.get_identities.side_effect = [ { "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), }, { "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "4C1067833814CE4738EBD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", - "8903EC63C238B04C138EBD6F067833814CE47CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)", + "4C1067833814CE4738EBD6F8903EC63C238B0CA3": ( + "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), + "8903EC63C238B04C138EBD6F067833814CE47CA3": ( + "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)" + ), }, ] @@ -281,26 +309,45 @@ def test_select_installer_identity(dummy_command): def test_installer_identity_matching_app(dummy_command): """The list of possible installer identities includes non-app identities from the same team.""" - # get_identities is invoked twice - once with app identities, and once with all identities. + # get_identities is invoked twice - once with app identities, and once with + # all identities. dummy_command.get_identities.side_effect = [ { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "EBD6F8903EC63C238B0384C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (83DLEZ2K43)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), }, { # The app identity that will be selected - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), # A different app identity - "EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)", + "EBD6F8903EC63C238B0384C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (83DLEZ2K43)" + ), # An installer identity that doesn't match the selected app identity - "1067833814CE4738EB4CD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)", + "1067833814CE4738EB4CD6F8903EC63C238B0CA3": ( + "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)" + ), # An installer identity that *does* match the selected app identity - "4C1067833814CE4738EBD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)", + "4C1067833814CE4738EBD6F8903EC63C238B0CA3": ( + "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)" + ), # A different app identity - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), # Another installer identity that match the selected app identity - "8903EC63C238B04C138EBD6F067833814CE47CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)", + "8903EC63C238B04C138EBD6F067833814CE47CA3": ( + "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)" + ), }, ] @@ -331,19 +378,33 @@ def test_installer_identity_no_match(dummy_command): # get_identities is invoked twice - once with app identities, and once with all identities. dummy_command.get_identities.side_effect = [ { - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", - "EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)", - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), + "EBD6F8903EC63C238B0384C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (83DLEZ2K43)" + ), + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), }, { # The app identity that will be selected - "38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)", + "38EBD6F8903EC63C238B04C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (Z2K4383DLE)" + ), # A different app identity - "EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)", + "EBD6F8903EC63C238B0384C1067833814CE47CA3": ( + "Developer ID Application: Example Corp Ltd (83DLEZ2K43)" + ), # An installer identity that doesn't match the selected app identity - "1067833814CE4738EB4CD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)", + "1067833814CE4738EB4CD6F8903EC63C238B0CA3": ( + "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)" + ), # A different app identity - "11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)", + "11E77FB58F13F6108B38110D5D92233C58ED38C5": ( + "iPhone Developer: Jane Smith (BXAH5H869S)" + ), }, ] From 0836eabb5d1b216901709e91d12e66ce63775fde Mon Sep 17 00:00:00 2001 From: Kavya Barangi Date: Sun, 3 May 2026 20:58:43 +0530 Subject: [PATCH 2/8] Add change note for 2383 --- changes/2383.misc.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changes/2383.misc.rst diff --git a/changes/2383.misc.rst b/changes/2383.misc.rst new file mode 100644 index 0000000000..1d7723ac02 --- /dev/null +++ b/changes/2383.misc.rst @@ -0,0 +1,4 @@ +Resolved E501 line too long errors in test_signing.py. + + + From 918fc3b02bf32543f1b527b6d2871df9b2859023 Mon Sep 17 00:00:00 2001 From: Kavya Barangi Date: Sun, 3 May 2026 21:29:59 +0530 Subject: [PATCH 3/8] Fix empty lines at end of file --- changes/2383.misc.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/changes/2383.misc.rst b/changes/2383.misc.rst index 1d7723ac02..71007ad69e 100644 --- a/changes/2383.misc.rst +++ b/changes/2383.misc.rst @@ -1,4 +1 @@ -Resolved E501 line too long errors in test_signing.py. - - - +Resolved E501 line too long errors in test_signing.py. \ No newline at end of file From 9c024660ff4f5be4bf3909df5804ffcc5221f195 Mon Sep 17 00:00:00 2001 From: Kavya Barangi Date: Mon, 4 May 2026 09:14:57 +0530 Subject: [PATCH 4/8] Remove E501 ignore rule for platforms --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1a21f2cd5a..6c2e5489f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -299,8 +299,7 @@ known-third-party = ["build"] [tool.ruff.lint.per-file-ignores] # E501: line too long, to be fixed in future changes -"tests/integrations/*" = ["E501"] -"tests/platforms/*" = ["E501"] +# "tests/integrations/*" = ["E501"] [tool.rumdl] flavor = "mkdocs" From 8afc7998282d82b9ab3a404284f5c453e7f5eabf Mon Sep 17 00:00:00 2001 From: Kavya Barangi Date: Mon, 4 May 2026 17:57:19 +0530 Subject: [PATCH 5/8] Fix toml comment and add empty line --- changes/2383.misc.rst | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changes/2383.misc.rst b/changes/2383.misc.rst index 71007ad69e..4b1fb79766 100644 --- a/changes/2383.misc.rst +++ b/changes/2383.misc.rst @@ -1 +1 @@ -Resolved E501 line too long errors in test_signing.py. \ No newline at end of file +Resolved E501 line too long errors in test_signing.py. diff --git a/pyproject.toml b/pyproject.toml index 6c2e5489f4..c2b0f30607 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -299,7 +299,7 @@ known-third-party = ["build"] [tool.ruff.lint.per-file-ignores] # E501: line too long, to be fixed in future changes -# "tests/integrations/*" = ["E501"] +"tests/integrations/*" = ["E501"] [tool.rumdl] flavor = "mkdocs" From 728a60c70976205611bef5a7cd64884697ddd7a5 Mon Sep 17 00:00:00 2001 From: Kavya Barangi Date: Mon, 4 May 2026 18:15:20 +0530 Subject: [PATCH 6/8] Fix E501 line too long in test_android_log_clean_filter --- .../platforms/android/gradle/test_android_log_clean_filter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/platforms/android/gradle/test_android_log_clean_filter.py b/tests/platforms/android/gradle/test_android_log_clean_filter.py index 653a6fc26f..3169e6cc3c 100644 --- a/tests/platforms/android/gradle/test_android_log_clean_filter.py +++ b/tests/platforms/android/gradle/test_android_log_clean_filter.py @@ -44,7 +44,8 @@ ("Python app launched & stored in Android Activity class", True), ), ( - "\x1b[32mI/python.stdout: Python app launched & stored in Android Activity class\x1b[0m", + "\x1b[32mI/python.stdout: Python app launched & " + "stored in Android Activity class\x1b[0m", ("Python app launched & stored in Android Activity class", True), ), ( From 33fd864e84bc1cb98ce1ca29d99a8c6b78260733 Mon Sep 17 00:00:00 2001 From: Kavya Barangi Date: Mon, 4 May 2026 18:26:45 +0530 Subject: [PATCH 7/8] Fix line length on line 72 --- .../platforms/android/gradle/test_android_log_clean_filter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/platforms/android/gradle/test_android_log_clean_filter.py b/tests/platforms/android/gradle/test_android_log_clean_filter.py index 3169e6cc3c..4b7d1604b4 100644 --- a/tests/platforms/android/gradle/test_android_log_clean_filter.py +++ b/tests/platforms/android/gradle/test_android_log_clean_filter.py @@ -69,7 +69,8 @@ ("test_case (tests.foobar.test_other.TestOtherMethods)", True), ), ( - "\x1b[32mI/python.stderr: test_case (tests.foobar.test_other.TestOtherMethods)\x1b[0m", + "\x1b[32mI/python.stderr: test_case " + "(tests.foobar.test_other.TestOtherMethods)\x1b[0m", ("test_case (tests.foobar.test_other.TestOtherMethods)", True), ), ( From 6b297581fd5ab722718f574c471a0ceabbf85d6c Mon Sep 17 00:00:00 2001 From: Kavya Barangi Date: Mon, 4 May 2026 18:47:53 +0530 Subject: [PATCH 8/8] Fix space allignment --- tests/platforms/android/gradle/test_android_log_clean_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/platforms/android/gradle/test_android_log_clean_filter.py b/tests/platforms/android/gradle/test_android_log_clean_filter.py index 4b7d1604b4..ac236c7c67 100644 --- a/tests/platforms/android/gradle/test_android_log_clean_filter.py +++ b/tests/platforms/android/gradle/test_android_log_clean_filter.py @@ -69,7 +69,7 @@ ("test_case (tests.foobar.test_other.TestOtherMethods)", True), ), ( - "\x1b[32mI/python.stderr: test_case " + "\x1b[32mI/python.stderr: test_case " "(tests.foobar.test_other.TestOtherMethods)\x1b[0m", ("test_case (tests.foobar.test_other.TestOtherMethods)", True), ),