diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-05-09 15:10:25 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-05-09 15:12:01 +0200 |
commit | 924f0c734a7accb87e2ac911cee6e24dd463f237 (patch) | |
tree | eb1bcaa2f25933374d28905bcb56e2e8aabeec62 /readyaml.py | |
parent | 8a05a6d8bacea0643a4967eed4cd67019ee0b6d7 (diff) | |
download | debian-dedup-924f0c734a7accb87e2ac911cee6e24dd463f237.tar.gz |
Diffstat (limited to 'readyaml.py')
-rwxr-xr-x | readyaml.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/readyaml.py b/readyaml.py index b88d1e0..7008263 100755 --- a/readyaml.py +++ b/readyaml.py @@ -5,11 +5,13 @@ updates the database with the contents.""" import argparse import sqlite3 import sys +import typing from debian.debian_support import version_compare import yaml -def readyaml(db, stream): + +def readyaml(db: sqlite3.Connection, stream: typing.TextIO) -> None: cur = db.cursor() cur.execute("PRAGMA foreign_keys = ON;") gen = yaml.load_all(stream, yaml.CSafeLoader) @@ -53,7 +55,8 @@ def readyaml(db, stream): for func, hexhash in entry["hashes"].items())) raise ValueError("missing commit block") -def main(): + +def main() -> None: parser = argparse.ArgumentParser() parser.add_argument("-d", "--database", action="store", default="test.sqlite3", |