Skip to content

Commit

Permalink
chore: pre-commit autoupdate (#2833)
Browse files Browse the repository at this point in the history
* chore: pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.1 → v0.9.2](astral-sh/ruff-pre-commit@v0.9.1...v0.9.2)

* Match raised warnings

---------

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 Jan 20, 2025
1 parent 1079131 commit 0572fef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
rev: v0.9.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
4 changes: 2 additions & 2 deletions tests/core/test_sql_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_convert_jsonschema_type_to_sql_type(
jsonschema_type: dict,
sql_type: sa.types.TypeEngine,
):
with pytest.warns(DeprecationWarning):
with pytest.warns(DeprecationWarning, match="Use `JSONSchemaToSQL` instead"):
result = th.to_sql_type(jsonschema_type)
assert isinstance(result, sql_type.__class__)
assert str(result) == str(sql_type)
Expand All @@ -71,7 +71,7 @@ def test_convert_sql_type_to_jsonschema_type(
sql_type: sa.types.TypeEngine,
is_of_jsonschema_type: dict,
):
with pytest.warns(DeprecationWarning):
with pytest.warns(DeprecationWarning, match="Use `SQLToJSONSchema` instead"):
result = th.to_jsonschema_type(sql_type)

assert result == is_of_jsonschema_type
10 changes: 8 additions & 2 deletions tests/samples/test_tap_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ def test_tap_stream_transformed_catalog_schema_matches_record(
runner: TapTestRunner,
stream: CSVStream,
):
with pytest.warns(UserWarning):
with pytest.warns(
UserWarning,
match="Fields in transformed catalog but not in records",
):
super().test_tap_stream_transformed_catalog_schema_matches_record(
config,
resource,
Expand All @@ -102,5 +105,8 @@ def test_tap_stream_returns_record(
runner: TapTestRunner,
stream: CSVStream,
):
with pytest.warns(UserWarning):
with pytest.warns(
UserWarning,
match="No records returned in stream",
):
super().test_tap_stream_returns_record(config, resource, runner, stream)

0 comments on commit 0572fef

Please sign in to comment.