python: Reformat code with black 22.3.0
Related to T3922
This commit is contained in:
parent
00f1b99ad9
commit
d38e05cff7
37 changed files with 265 additions and 144 deletions
|
@ -132,7 +132,8 @@ def parse_packaged_date(package_info: Dict[str, str]) -> Optional[datetime]:
|
|||
):
|
||||
try:
|
||||
packaged_at = datetime.strptime(
|
||||
packaged_at_str.split(";")[0], date_format,
|
||||
packaged_at_str.split(";")[0],
|
||||
date_format,
|
||||
).replace(tzinfo=timezone.utc)
|
||||
break
|
||||
except Exception:
|
||||
|
|
|
@ -20,7 +20,12 @@ from swh.lister.cran.lister import (
|
|||
def test_cran_compute_origin_urls():
|
||||
pack = "something"
|
||||
vers = "0.0.1"
|
||||
origin_url, artifact_url = compute_origin_urls({"Package": pack, "Version": vers,})
|
||||
origin_url, artifact_url = compute_origin_urls(
|
||||
{
|
||||
"Package": pack,
|
||||
"Version": vers,
|
||||
}
|
||||
)
|
||||
|
||||
assert origin_url == f"{CRAN_MIRROR}/package={pack}"
|
||||
assert artifact_url == f"{CRAN_MIRROR}/src/contrib/{pack}_{vers}.tar.gz"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue