Skip to content

Commit 5f592d6

Browse files
Enable reportOptionalIterable in pyright (#307)
1 parent b613011 commit 5f592d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pins/rsconnect/api.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,9 @@ def _raw_query(self, url, method="GET", return_request=False, **kwargs):
234234
data = r.json()
235235
self._validate_json_response(data)
236236
return data
237-
except requests.JSONDecodeError:
237+
except requests.JSONDecodeError as err:
238238
r.raise_for_status()
239+
raise err # Fallback if somehow there was no HTTPError
239240

240241
def walk_paginated_offsets(self, f_query, endpoint, method, params=None, **kwargs):
241242
if params is None:

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ reportIncompatibleMethodOverride = false
106106
reportIndexIssue = false
107107
reportMissingImports = false
108108
reportMissingTypeStubs = false
109-
reportOptionalIterable = false
110109
reportOptionalMemberAccess = false
111110
reportOptionalSubscript = false
112111
reportPossiblyUnboundVariable = false

0 commit comments

Comments
 (0)