Skip to content

Commit

Permalink
Make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jul 22, 2024
1 parent 3a9aa7e commit 6b664ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tap_github/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def parse_response(self, response: requests.Response) -> Iterable[dict]:
if response.status_code in (
self.tolerated_http_errors + [EMPTY_REPO_ERROR_STATUS]
):
return []
return

# Update token rate limit info and loop through tokens if needed.
self.authenticator.update_rate_limit(response.headers)
Expand Down
8 changes: 4 additions & 4 deletions tap_github/repository_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def http_headers(self) -> dict:
def parse_response(self, response: requests.Response) -> Iterable[dict]:
"""Parse the README to yield the html response instead of an object."""
if response.status_code in self.tolerated_http_errors:
return []
return

yield {"raw_html": response.text}

Expand Down Expand Up @@ -726,7 +726,7 @@ class LanguagesStream(GitHubRestStream):
def parse_response(self, response: requests.Response) -> Iterable[dict]:
"""Parse the language response and reformat to return as an iterator of [{language_name: Python, bytes: 23}]."""
if response.status_code in self.tolerated_http_errors:
return []
return

languages_json = response.json()
for key, value in languages_json.items():
Expand Down Expand Up @@ -1537,7 +1537,7 @@ def parse_response(self, response: requests.Response) -> Iterable[dict]:
# TODO: update this and validate_response when
# https://github.com/meltano/sdk/pull/1754 is merged
if response.status_code != 200:
return []
return
yield from super().parse_response(response)

def validate_response(self, response: requests.Response) -> None:
Expand Down Expand Up @@ -2325,7 +2325,7 @@ class TrafficRestStream(GitHubRestStream):

def parse_response(self, response: requests.Response) -> Iterable[dict]:
if response.status_code != 200:
return []
return

"""Parse the response and return an iterator of result rows."""
yield from extract_jsonpath(self.records_jsonpath, input=response.json())
Expand Down

0 comments on commit 6b664ac

Please sign in to comment.