Skip to content

Commit

Permalink
Address type reporting in pretty_format_java.py
Browse files Browse the repository at this point in the history
While updating mypy configs , pre-commit have identified a typing issue. This changes fixes it without altering the logic
  • Loading branch information
macisamuele committed Dec 3, 2023
1 parent 628f6ae commit 2ae2218
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion language_formatters_pre_commit_hooks/pretty_format_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_urls(_version: str) -> typing.List[str]:
try:
return download_url(url_to_download, "google-java-formatter{version}.jar".format(version=version))
except requests.HTTPError as e:
if e.response.status_code != 404:
if not e.response or e.response.status_code != 404:
# If the url was not found then move forward with the next links
raise

Expand Down

0 comments on commit 2ae2218

Please sign in to comment.