From 2cd3371417115c615b96bd22b50db202b4c6c67a Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Wed, 8 Apr 2020 17:37:51 -0700 Subject: [PATCH 1/1] Rename top-level procedures --- pinch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.44.1