Skip to content

Commit 943a894

Browse files
committed
Fixing statis analysis in fetch_upload
1 parent 7cf1000 commit 943a894

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

zulip/zulip/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def get_user_agent(self) -> str:
465465
)
466466

467467
def do_api_query(self, orig_request: Mapping[str, Any], url: str, method: str = "POST",
468-
longpolling: bool = False, files: Optional[List[IO[Any]]] = None, timeout: Optional[float] = None,
468+
longpolling: bool = False, files: Optional[List[IO[Any]]] = None, timeout: Optional[float] = None,
469469
accesswithAPI: bool = True) -> Dict[str, Any]:
470470
if files is None:
471471
files = []
@@ -527,7 +527,7 @@ def end_error_retry(succeeded: bool) -> None:
527527
if accesswithAPI:
528528
if not api_url.endswith(API_STRING):
529529
api_url += API_STRING
530-
api_url += "/"
530+
api_url += "/"
531531
else:
532532
if api_url.endswith(API_STRING):
533533
api_url = api_url[:-len(API_STRING)]
@@ -608,7 +608,7 @@ def end_error_retry(succeeded: bool) -> None:
608608
"status_code": res.status_code}
609609

610610
def call_endpoint(self, url: Optional[str] = None, method: str = "POST", request: Optional[Dict[str, Any]] = None,
611-
longpolling: bool = False, files: Optional[List[IO[Any]]] = None, timeout: Optional[float] = None,
611+
longpolling: bool = False, files: Optional[List[IO[Any]]] = None, timeout: Optional[float] = None,
612612
accessVersionedAPI: bool = True) -> Dict[str, Any]:
613613
if request is None:
614614
request = dict()
@@ -754,10 +754,9 @@ def fetch_upload(self) -> Dict[str, Any]:
754754
'''
755755
See examples/upload-file for example usage.
756756
'''
757-
758757
return self.call_endpoint(
759758
url='user_uploads',
760-
method = 'GET',
759+
method = 'GET',
761760
accessVersionedAPI = False
762761
)
763762

0 commit comments

Comments
 (0)