Repository navigation
Fix Hungarian distance-only humanization - #1409
Open
ViktorBystrov72 wants to merge 1 commit into
Open
ViktorBystrov72 wants to merge 1 commit into
ViktorBystrov72 wants to merge 1 commit into
Conversation
Use the existing future timeframe forms for standalone distances, including multi-part descriptions and zero values. Preserve the inflected past forms when relative wording is included.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1409 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 2315 2325 +10
Branches 358 362 +4
=========================================
+ Hits 2315 2325 +10 ☔ View full report in Codecov by Harness. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
masterbranch.Description of Changes
Closes #438.
For past dates, Hungarian
humanize(..., only_distance=True)includes the case suffix used with "ago": for example,17 évvelinstead of17 év. Use the locale's existing unsuffixed forms for distance-only output, including multi-component intervals. Relative descriptions still use their existing past/future forms.The regression tests cover singular and plural units, both directions, zero components, the "now" case, multi-component output, and the public
humanize()API with all Hungarian locale aliases. The original issue's example now returns17 év; a two-day, three-hour interval returns2 nap 3 óra.Validation on macOS arm64, Python 3.14.4:
arrow/locales.pyhas 100% statement and branch coverage.git diff --checkpassed.The full test run reports an existing
dateutil.zoneinfodeprecation warning fromtests/utils.py. The documented API contract is unchanged, so no documentation change is included.CI note: the Ubuntu Python 3.8 and 3.9 jobs fail in
actions/setup-python, before installation or tests, because those interpreter builds are unavailable on Ubuntu 26.04. The Windows PyPy job also fails before tests while installing PyYAML build dependencies (IncompleteRead(190689 bytes read, 1299 more expected)). All three failures occur identically on the unchanged upstream commit in the scheduled base run. The existing #1393 addresses these CI issues. Ubuntu Python 3.10–3.14 passed for this PR.OpenAI Codex assisted with the implementation, regression tests, and PR description. The reported checks were run locally; no human review is claimed.