Skip to content

Commit

Permalink
chore: pre-commit autoupdate (#277)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 →
v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)
- [github.com/asottile/pyupgrade: v3.15.1 →
v3.16.0](asottile/pyupgrade@v3.15.1...v3.16.0)
- [github.com/psf/black: 24.2.0 →
24.4.2](psf/black@24.2.0...24.4.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 →
v1.11.0](pre-commit/mirrors-mypy@v1.8.0...v1.11.0)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Edgar Ramírez-Mondragón <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and edgarrmondragon authored Jul 22, 2024
1 parent 169de68 commit 12c845e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-json
exclude: "\\.vscode/.*.json"
Expand All @@ -15,13 +15,13 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.4.2
hooks:
- id: black

Expand All @@ -31,7 +31,7 @@ repos:
- id: isort

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.11.0
hooks:
- id: mypy
pass_filenames: true
Expand Down
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 12c845e

Please sign in to comment.