Skip to content

Commit a7a1df4

Browse files
author
github-actions
committed
fix: Skip to_series tests when pandas not installed, update ruff pre-commit
1 parent ddeb128 commit a7a1df4

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repos:
88
- id: check-added-large-files
99

1010
- repo: https://github.com/astral-sh/ruff-pre-commit
11-
rev: v0.8.2
11+
rev: v0.11.0
1212
hooks:
1313
- id: ruff
1414
args: [--fix]

tests/test_address_parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,7 @@ def test_parse_international_failure_returns_error(monkeypatch) -> None:
11101110

11111111
def test_to_series_errors_raise_without_error(monkeypatch) -> None:
11121112
"""to_series should raise RyanDataAddressError when invalid result has no error."""
1113+
pytest.importorskip("pandas")
11131114
service = AddressService()
11141115

11151116
def fake_parse(_addr, *, validate=True, expand=True):
@@ -1139,6 +1140,7 @@ def test_parse_international_no_libpostal(monkeypatch) -> None:
11391140

11401141
def test_to_series_errors_raise_uses_result_error(monkeypatch) -> None:
11411142
"""to_series with errors='raise' should raise the parse error."""
1143+
pytest.importorskip("pandas")
11421144
service = AddressService()
11431145

11441146
def fake_parse(_addr, *, validate=True, expand=True):
@@ -1222,6 +1224,7 @@ def fake_parse_intl(addr, expand=True):
12221224

12231225
def test_to_series_errors_coerce_returns_none(monkeypatch) -> None:
12241226
"""to_series with errors='coerce' should return None fields on failure."""
1227+
pytest.importorskip("pandas")
12251228
service = AddressService()
12261229

12271230
def fake_parse(_addr, *, validate=True, expand=True):

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)