Unverified Commit 1d8e2393 authored by Maxim Baz's avatar Maxim Baz
Browse files

use pathlib.stem for a bit cleaner syntax

parent dfdc743e
......@@ -27,7 +27,7 @@ async def main(repo_from, repo_to, pkgbases) -> int:
# load existing repo metadata
meta = {
repo: {
p.name[:-5]: json.load((metadir / repo / p).open())
p.stem: json.load((metadir / repo / p).open())
for p in (metadir / repo).glob("*.json")
}
for repo in [repo_from, repo_to]
......
......@@ -21,7 +21,7 @@ async def main(repo, pkgbases) -> int:
# load existing repo metadata
meta = {
repo: {
p.name[:-5]: json.load((metadir / repo / p).open())
p.stem: json.load((metadir / repo / p).open())
for p in (metadir / repo).glob("*.json")
}
}
......
......@@ -134,7 +134,7 @@ async def main() -> int:
# load existing repo metadata
meta = {
repo: {
p.name[:-5]: json.load((metadir / repo / p).open())
p.stem: json.load((metadir / repo / p).open())
for p in (metadir / repo).glob("*.json")
}
for repo in packages.keys()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment