Skip to content

Commit

Permalink
Fix linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowmoose committed Oct 11, 2022
1 parent fee2730 commit ec45443
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyderman/util/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions pyderman/util/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ec45443

Please sign in to comment.