Skip to content

Commit a5b6151

Browse files
committed
adjust for mypy
1 parent 7d2cff6 commit a5b6151

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

atlassian/confluence.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2742,11 +2742,11 @@ def get_space_export(self, space_key: str, export_type: str) -> str:
27422742
:return: The URL to download the exported file.
27432743
"""
27442744

2745-
def get_atl_request(url: str):
2745+
def get_atl_request(link: str):
27462746
# Nested function used to get atl_token used for XSRF protection.
27472747
# This is only applicable to html/csv/xml space exports
27482748
try:
2749-
response = self.get(url, advanced_mode=True)
2749+
response = self.get(link, advanced_mode=True)
27502750
parsed_html = BeautifulSoup(response.text, "html.parser")
27512751
atl_token = parsed_html.find("input", {"name": "atl_token"}).get("value") # type: ignore[union-attr]
27522752
return atl_token
@@ -2806,11 +2806,10 @@ def get_atl_request(url: str):
28062806
running_task = True
28072807
while running_task:
28082808
try:
2809-
progress_response = self.get(poll_url)
2810-
assert progress_response
2811-
log.info("Space" + space_key + " export status: " + progress_response["message"])
2812-
if progress_response["complete"]:
2813-
parsed_html = BeautifulSoup(progress_response["message"], "html.parser")
2809+
progress_response = self.get(poll_url) or {}
2810+
log.info(f"Space {space_key} export status: {progress_response.get('message', 'None')}")
2811+
if progress_response is not {} and progress_response.get("complete"):
2812+
parsed_html = BeautifulSoup(progress_response.get("message"), "html.parser")
28142813
download_url = cast("str", parsed_html.find("a", {"class": "space-export-download-path"}).get("href")) # type: ignore
28152814
if self.url in download_url:
28162815
return download_url

atlassian/jira.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3494,7 +3494,7 @@ def enhanced_jql(
34943494
if not self.cloud:
34953495
raise ValueError("``enhanced_jql`` method is only available for Jira Cloud platform")
34963496
params: dict = {}
3497-
3497+
34983498
if nextPageToken is not None:
34993499
params["nextPageToken"] = str(nextPageToken)
35003500
if limit is not None:

0 commit comments

Comments
 (0)