Skip to content

Fix DeprecationWarning in _json_value by handling array-like values; … - #29

Merged
JohnnyWilson16 merged 2 commits into
mainfrom
fix/json-value-array-handling
Jun 18, 2026
Merged

JohnnyWilson16 merged 2 commits into
mainfrom
fix/json-value-array-handling

Conversation

@JohnnyWilson16

Copy link
Copy Markdown
Contributor

…add regression test

Description

Please include a summary of the changes and the related issue/feature description.

Fixes # (issue number if applicable)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor / Style / Performance improvement

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Type checks (mypy) and linter checks (ruff) pass locally

Extend the DeprecationWarning fix to plan.py (not just duplicate_defense.py):
- Add numpy array and pandas Series handling in plan._json_value before
  pd.isna() call to avoid ambiguous truth-value check
- Guard _is_missing_scalar against array-like inputs (np.ndarray, pd.Series,
  list, tuple, dict) which would fail on bool(pd.isna(array))
- Fix import order in duplicate_defense.py (ruff I001)
- Add regression tests for plan._json_value and _is_missing_scalar
@JohnnyWilson16
JohnnyWilson16 merged commit 641a9b9 into main Jun 18, 2026
6 checks passed
@kevincostner17
kevincostner17 deleted the fix/json-value-array-handling branch September 14, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant