Skip to content

Commit

Permalink
ci: Apply new pylint rules to code
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzWeber0 committed Oct 8, 2024
1 parent f6aa487 commit 2f753b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 8 additions & 6 deletions capella/download_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@


def get_directory_structure(url: str) -> list[str]:
response = requests.get(url)
response = requests.get(url, timeout=10)
response.raise_for_status()

tree = etree.fromstring(response.content, parser=html.HTMLParser())
return tree.xpath("//*/a/text()")


if __name__ == "__main__":
def main() -> None:
capella_version = sys.argv[1]
print(f"Installing Capella {capella_version}")

Expand All @@ -55,8 +55,10 @@ def get_directory_structure(url: str) -> list[str]:
f"{capella_archive_path}{archive_name}"
)

download_response = requests.get(download_url)
download_response = requests.get(download_url, timeout=120)
download_response.raise_for_status()
download_path = pathlib.Path("/opt/capella.tar.gz").write_bytes(
download_response.content
)
pathlib.Path("/opt/capella.tar.gz").write_bytes(download_response.content)


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ disable = [
"too-few-public-methods",
"too-many-ancestors",
"too-many-arguments",
"too-many-positional-arguments",
"too-many-boolean-expressions",
"too-many-branches",
"too-many-instance-attributes",
Expand Down

0 comments on commit 2f753b4

Please sign in to comment.