public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/opentype-sanitizer] rawhide: Format and tidy up get-source.py
Date: Sun, 25 Oct 2026 07:13:48 GMT	[thread overview]
Message-ID: <179291242870.1.12461547820269142929.rpms-opentype-sanitizer-a0b69465a301@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/opentype-sanitizer
            Branch : rawhide
            Commit : a0b69465a301b5e07421764343696147724f880c
            Author : Benjamin A. Beasley <code@musicinmybrain.net>
            Date   : 2026-10-25T07:12:54+00:00
            Stats  : +11/-17 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/opentype-sanitizer/c/a0b69465a301b5e07421764343696147724f880c?branch=rawhide

            Log:
            Format and tidy up get-source.py

[skip changelog]

---
diff --git a/get-source.py b/get-source.py
index 2a10358..ee927e2 100755
--- a/get-source.py
+++ b/get-source.py
@@ -1,5 +1,4 @@
 #!/usr/bin/python3
-# -*- coding: utf-8 -*-
 
 import struct
 import tarfile
@@ -77,10 +76,8 @@ MANUAL_YES = {
     "72106114384cb564d4691bd3ea38960b0148f00b",
     "73bf759cd86e12788cd3571daffedeb391fad078",
     "757ebd573617a24aa9dfbf0b885c54875c6fe06b",
-    "757ebd573617a24aa9dfbf0b885c54875c6fe06b",
     "7a37dc4d5bf018456aea291cee06daf004c0221c",
     "7e14e7883ed152baa158b80e207b66114c823a8b",
-    "7e14e7883ed152baa158b80e207b66114c823a8b",
     "8099955657a54e9ee38a6ba1d6f950ce58e3cc25",
     "814e2e2e76682ab9a518493b475b23565993a4df",
     "8a8dc0703e7a9d14427ceadcea275dfda6a7f844",
@@ -90,7 +87,6 @@ MANUAL_YES = {
     "99e872a7478a9f7f7f2a183d623f2a5ebaff72ad",
     "a0ca212e069702964aba80ab9c28bcb8aabae782",
     "b9e2aaa0d75fcef6971ec3a96d806ba4a6b31fe2",
-    "b9e2aaa0d75fcef6971ec3a96d806ba4a6b31fe2",
     "bb0c53752e85c3d28973ebc913287b8987d3dfe8",
     "c64aff5250ea7360a18154e58678ab14a8e6fee9",
     "cc5f3d2d717fb6bd4dfae1c16d48a2cb8e12233b",
@@ -200,7 +196,6 @@ MANUAL_NO = {
     "1d5090bfad0eeb11c88882085d4a195f73926327",
     "1ef2c4e95428d382ed8653c6657bdb66eb0f415d",
     "205edd09bd3d141cc9580f650109556cc28b22cb",
-    "205edd09bd3d141cc9580f650109556cc28b22cb",
     "217a934cfe15c548b572c203dceb2befdf026462",
     "23b2a3316b3797bf9a61acdf36cf63d10ab3342e",
     "251a4ffb5418b336217a9e7958941192b5a20137",
@@ -249,7 +244,6 @@ MANUAL_NO = {
     "7c8eefff708b374fffbce135ba28a4565766e560",
     "81942d3ea419539b69990ba98f824a8a46dcb951",
     "8240789f6d12d4cfc4b5e8e6f246c3701bcf861f",
-    "8240789f6d12d4cfc4b5e8e6f246c3701bcf861f",
     "8330c9816493e1adccc0500b414455b85088d7d1",
     "83670edbe0a52e2e84b4454b1a828c44b6692c63",
     "85d903c71a429ed98a012e742a700cbe2fef005c",
@@ -309,7 +303,6 @@ MANUAL_NO = {
     "08b3b69027fc071fa71910cc7857833b7e5f4534",
     "092da87de7e293efee8be43f531b5bf0612693a5",
     "0c60702ee5003855555fee931a2da7daa917a1ef",
-    "0e4a70a10a82f7f4d63865006e81a445de26d3d1",
     "10531f9105aa03bf6e0f9754ec8af33ed457ad5c",
     "13124b99e25a379efbdd1c3820b1484f842e1ad5",
     "15dfc433a135a658b9f4b1a861b5cdd9658ccbb9",
@@ -497,9 +490,11 @@ FSTYPE_PROBLEM_BITS = {
 LICENSE_STRINGS = {
     "OFL": ["SIL OPEN FONT LICENSE", "Open Font License"],
     "GPLv2+": [
-        "GNU General Public License as published by the Free Software "
-        "Foundation; either version 2 of the License, or (at your option) "
-        "any later version"
+        (
+            "GNU General Public License as published by the Free Software "
+            "Foundation; either version 2 of the License, or (at your option) "
+            "any later version"
+        )
     ],
     "ASL 2.0": ["Apache License, Version 2.0"],
     "BSD": ["License same as MutatorMath", "BSD 3-clause"],
@@ -545,7 +540,7 @@ def identify_tt(tt):
             os2 = tt["OS/2"]
     except KeyError:
         pass
-    except Exception:
+    except Exception:  # noqa: BLE001
         return Tristate.MAYBE, f"error decoding OS/2 table:\n{format_exc()}"
     else:
         for bit, meaning in FSTYPE_PROBLEM_BITS.items():
@@ -553,8 +548,8 @@ def identify_tt(tt):
                 return (
                     Tristate.NO,
                     (
-                        f"potentially non-free fsType: bit {bit} is set "
-                        f"(“{meaning}”)"
+                        f"potentially non-free fsType: "
+                        f"bit {bit} is set (“{meaning}”)"
                     ),
                 )
 
@@ -563,7 +558,7 @@ def identify_tt(tt):
             name = tt["name"]
     except KeyError:
         pass
-    except Exception:
+    except Exception:  # noqa: BLE001
         return Tristate.MAYBE, f"error decoding name table:\n{format_exc()}"
     else:
         for n in name.names:
@@ -601,9 +596,7 @@ result will be something like ots-${VERSION}-filtered.tar.xz.
 
 def download(destfile, version):
     url = UPSTREAM.format(version=version)
-    print(
-        f"Downloading {urlparse(url).path.rsplit('/', 1)[-1]}:", file=stderr
-    )
+    print(f"Downloading {urlparse(url).path.rsplit('/', 1)[-1]}:", file=stderr)
     response = get(url, stream=True)
     total = int(response.headers.get("content-length", 0))
     with tqdm(total=total, unit="iB", unit_scale=True) as progress:

diff --git a/ruff.toml b/ruff.toml
new file mode 100644
index 0000000..28d6185
--- /dev/null
+++ b/ruff.toml
@@ -0,0 +1 @@
+line-length = 79

                 reply	other threads:[~2026-10-25  7:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179291242870.1.12461547820269142929.rpms-opentype-sanitizer-a0b69465a301@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox