Skip to content

Honor supplied object customizers regardless of truth value - #331

Merged
dgilland merged 3 commits into
dgilland:developfrom
theman6660:fix/false-valued-object-customizers
Oct 18, 2026
Merged

dgilland merged 3 commits into
dgilland:developfrom
theman6660:fix/false-valued-object-customizers

Conversation

@theman6660

@theman6660 theman6660 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

assign_with(), set_with() and update_with() silently skip valid callable customizers whose bool returns False or whose len returns zero. A callback that disallows boolean conversion raises before it is called.

Distinguish an absent customizer from a supplied callable with explicit None checks. Keep existing positional/keyword callback handling, None-result fallback, and non-callable container templates.

Review follow-up: all 18 regression/control cases now live in the existing tests/test_objects.py beside the related tests. Merged latest develop (542fefa) and resolved the conflicts while preserving upstream changes. The contributor entry is already upstream, so this PR no longer changes AUTHORS.rst.

Local validation on Python 3.12.14: 2722 tests passed in the project-default unit/doctest scope (pytest src/pydash tests --ignore=tests/pytest_mypy_testing --cov=pydash), with 100% library statement coverage. Full Ruff lint and format checks, project-scope mypy (src/pydash, tests, tasks.py), generated chaining-stub comparison, and whitespace checks passed. Upstream CI is tracked separately in Checks.

Prepared with OpenAI Codex assistance. No production usage or independent human review is claimed.

@coveralls

coveralls commented Oct 18, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — theman6660:fix/false-valued-object-customizers into dgilland:develop

@dgilland dgilland left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests shouldn't go into a new test file. Instead put them in the appropriate test_<submodule>.py file that already exists.

Also, merge conflicts need resolution (I don't have permission to resolve them).

Since you have several PRs that all modified AUTHORS.rst and CHANGELOG.rst, each subsequent PR is going to conflict with the previously merged one. I don't mind resolving those conflicts myself, but you will need grant me permission to do so for each PR.

theman6660 and others added 2 commits October 19, 2026 02:09
…le suite

Resolve AUTHORS/CHANGELOG conflicts while preserving upstream changes. Keep the regression tests beside existing module tests, as requested in review.
@dgilland
dgilland merged commit 408d008 into dgilland:develop Oct 18, 2026
11 checks passed
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.

3 participants