Skip to content

Add conjunction parameter to natural_list - #316

Open
SAY-5 wants to merge 1 commit into
python-humanize:mainfrom
SAY-5:feat-natural-list-conjunction
Open

Add conjunction parameter to natural_list#316
SAY-5 wants to merge 1 commit into
python-humanize:mainfrom
SAY-5:feat-natural-list-conjunction

Conversation

@SAY-5

Copy link
Copy Markdown

Fixes#214

Changes proposed in this pull request:

  • Add a keyword-only conjunction parameter to natural_list, defaulting to "and" so existing behaviour is unchanged.
  • This implements the design hugovk suggested in the issue, allowing any string such as "or" or "and also".
  • Add tests covering the new parameter alongside the default.

@codspeed-hq

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 15 untouched benchmarks


Comparing SAY-5:feat-natural-list-conjunction (0cedecf) with main (bde649f)

Open in CodSpeed

@codecov

codecovBot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.55%. Comparing base (bde649f) to head (0cedecf).

Additional details and impacted files
@@ Coverage Diff @@## main #316 +/- ##
=======================================
Coverage 99.55% 99.55% =======================================
Files 12 12 Lines 898 901 +3 =======================================
+ Hits 894 897 +3 
Misses 4 4 
FlagCoverage Δ
macos-latest97.55% <100.00%> (+<0.01%)⬆️
ubuntu-latest97.55% <100.00%> (+<0.01%)⬆️
windows-latest95.67% <100.00%> (+0.01%)⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hugovkhugovk changed the title feat: add conjunction parameter to natural_listAdd conjunction parameter to natural_listMay 19, 2026
@hugovkhugovk added the changelog: Added For new features label May 19, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: AddedFor new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal for additional conjunction parameter in natural_list function

2 participants

@SAY-5@hugovk