From ec45443e03c31885c9a742b15b8251f5e1b9a365 Mon Sep 17 00:00:00 2001 From: ShadowMoose Date: Mon, 10 Oct 2022 18:23:16 -0700 Subject: [PATCH] Fix linting. --- pyderman/util/downloader.py | 2 +- pyderman/util/github.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyderman/util/downloader.py b/pyderman/util/downloader.py index 4758137..91878e8 100644 --- a/pyderman/util/downloader.py +++ b/pyderman/util/downloader.py @@ -19,7 +19,7 @@ def get_redirect(url) -> str | None: req = _open(url) if not req: return None - return req.geturl() + return str(req.geturl()) def raw(url: str, encoding: str = "utf-8") -> str | None: diff --git a/pyderman/util/github.py b/pyderman/util/github.py index fbd97b2..55c94b5 100644 --- a/pyderman/util/github.py +++ b/pyderman/util/github.py @@ -19,9 +19,7 @@ def find_links( if not version: version = "latest" if version == "latest": - redirect = downloader.get_redirect( - make_releases_url(author, project, version) - ) + redirect = downloader.get_redirect(make_releases_url(author, project, version)) if not redirect: raise Exception(f"Unable to locate latest version of {project}") version = redirect.split("/")[-1]