From: Scott Worley Date: Thu, 9 Apr 2020 00:37:51 +0000 (-0700) Subject: Rename top-level procedures X-Git-Tag: 1.0~21 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/2cd3371417115c615b96bd22b50db202b4c6c67a?ds=sidebyside Rename top-level procedures --- diff --git a/pinch.py b/pinch.py index f22a1c3..f0f0422 100644 --- a/pinch.py +++ b/pinch.py @@ -120,7 +120,7 @@ def fetch(v: Verification, channel_url: str) -> Info: return info -def parse_table(v: Verification, info: Info) -> None: +def parse_channel(v: Verification, info: Info) -> None: v.status('Parsing channel description as XML') d = xml.dom.minidom.parseString(info.channel_html) v.ok() @@ -206,7 +206,7 @@ def fetch_resources(v: Verification, info: Info) -> None: info.table['git-revision'].file).read(999) == info.git_commit) -def extract_channel(v: Verification, info: Info) -> None: +def check_channel_contents(v: Verification, info: Info) -> None: with tempfile.TemporaryDirectory() as d: v.status('Extracting %s' % info.table['nixexprs.tar.xz'].file) shutil.unpack_archive(info.table['nixexprs.tar.xz'].file, d) @@ -218,9 +218,9 @@ def extract_channel(v: Verification, info: Info) -> None: def main() -> None: v = Verification() info = fetch(v, 'https://channels.nixos.org/nixos-20.03') - parse_table(v, info) + parse_channel(v, info) fetch_resources(v, info) - extract_channel(v, info) + check_channel_contents(v, info) print(info)