Skip to content

Commit 12c845e

Browse files
chore: pre-commit autoupdate (#277)
<!--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]>
1 parent 169de68 commit 12c845e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ci:
55

66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v4.5.0
8+
rev: v4.6.0
99
hooks:
1010
- id: check-json
1111
exclude: "\\.vscode/.*.json"
@@ -15,13 +15,13 @@ repos:
1515
- id: trailing-whitespace
1616

1717
- repo: https://github.com/asottile/pyupgrade
18-
rev: v3.15.1
18+
rev: v3.16.0
1919
hooks:
2020
- id: pyupgrade
2121
args: [--py37-plus]
2222

2323
- repo: https://github.com/psf/black
24-
rev: 24.2.0
24+
rev: 24.4.2
2525
hooks:
2626
- id: black
2727

@@ -31,7 +31,7 @@ repos:
3131
- id: isort
3232

3333
- repo: https://github.com/pre-commit/mirrors-mypy
34-
rev: v1.8.0
34+
rev: v1.11.0
3535
hooks:
3636
- id: mypy
3737
pass_filenames: true

tap_github/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def parse_response(self, response: requests.Response) -> Iterable[dict]:
249249
if response.status_code in (
250250
self.tolerated_http_errors + [EMPTY_REPO_ERROR_STATUS]
251251
):
252-
return []
252+
return
253253

254254
# Update token rate limit info and loop through tokens if needed.
255255
self.authenticator.update_rate_limit(response.headers)

tap_github/repository_streams.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def http_headers(self) -> dict:
356356
def parse_response(self, response: requests.Response) -> Iterable[dict]:
357357
"""Parse the README to yield the html response instead of an object."""
358358
if response.status_code in self.tolerated_http_errors:
359-
return []
359+
return
360360

361361
yield {"raw_html": response.text}
362362

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

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

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

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

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

0 commit comments

Comments
 (0)