summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Improve extract performance via ignoring directories early during os.walkp694-reduxAarni Koskela2023-02-071-8/+29
| | | | Co-authored-by: Steven Kao <st.kao.05@gmail.com>
* Replace babel.localedata.locale_identifiers cache with LRU cacheAarni Koskela2023-02-072-21/+15
|
* Replace babel.dates._pattern_cache with an LRU cacheAarni Koskela2023-02-071-8/+6
| | | | Fixes #962
* Merge pull request #966 from DenverCoderOne/number-type-improvementsAarni Koskela2023-02-072-44/+36
|\ | | | | Numbers and core type fixes
| * Type fixes from 961Jonah Lawrence2023-02-031-2/+2
| |
| * Numbers and core type fixesJonah Lawrence2023-02-032-42/+34
|/
* Add two new options in cmdline.rst docs (#963)Maciej Olko2023-02-031-0/+6
| | | Added in #720 and #832.
* Keep @modifiers when parsing locales (#947)martin f. krafft2023-01-262-33/+88
| | | | | | | | | | | | | | | | | Locale modifiers ("@variants") are described in the GNU gettext documentation like this: > The ‘@variant’ can denote any kind of characteristics that is not > already implied by the language ll and the country CC. […] It can also > denote a dialect of the language, … Wherein Babel previously would discard these, this patch stores the modifier information in the `Locale` objects, handling string representation accordingly. Resolves: #946 Signed-off-by: martin f. krafft <madduck@madduck.net> Co-authored-by: Aarni Koskela <akx@iki.fi>
* Modernize some string formattingAarni Koskela2023-01-252-11/+7
|
* Apply some simplification fixes courtesy of RuffAarni Koskela2023-01-2510-80/+36
|
* Finally remove get_next_timezone_transition (#958)Aarni Koskela2023-01-253-140/+1
|
* Fix unbound `exc` in babel.dates (#959)Aarni Koskela2023-01-251-5/+4
| | | See https://stackoverflow.com/a/24271786/51685
* Use standard library UTC (#957)Aarni Koskela2023-01-251-5/+1
|
* Clean up babel.localtime (#952)Aarni Koskela2023-01-253-40/+57
| | | | * Remove vestigial babel.localtime cache bits * Give _FallbackLocalTimezone its own module
* Support for formatting NaN, Infinity (#955)Jonah Lawrence2023-01-252-2/+32
|
* Remove redundant tests for babel.support (#954)Aarni Koskela2023-01-202-38/+9
| | | The doctests test the exact same things.
* Update test dependencies (tox v4) (#953)Jonah Lawrence2023-01-202-10/+10
|
* Merge pull request #951 from python-babel/cldr-42Aarni Koskela2023-01-2011-42/+54
|\ | | | | Upgrade to CLDR 42
| * Adjust tests for CLDR 42Aarni Koskela2023-01-209-38/+42
| | | | | | | | | | | | | | The space changes around English seem to be on purpose, see: * https://unicode-org.atlassian.net/browse/CLDR-14032 * https://github.com/unicode-org/cldr/commit/a83026ab8c8fa6ed88f1047c4d0c6089f88b7e5d
| * Add test for #942Aarni Koskela2023-01-201-0/+4
| |
| * Import CLDR 42Aarni Koskela2023-01-202-4/+8
|/
* Merge pull request #949 from python-babel/ruffifyAarni Koskela2023-01-1947-709/+785
|\ | | | | Add ruff for linting
| * Enable E741 (ambiguous variable name) lintAarni Koskela2023-01-185-43/+43
| |
| * Apply some small miscellaneous formatting fixesAarni Koskela2023-01-1820-55/+63
| |
| * Apply ruff UP (Pyupgrade) fixesAarni Koskela2023-01-183-3/+2
| |
| * Apply ruff UP025 (unicode literal prefix) fixAarni Koskela2023-01-1822-466/+468
| |
| * Apply ruff SIM300 (de-yoda) fixesAarni Koskela2023-01-182-5/+5
| |
| * Apply ruff I category fixesAarni Koskela2023-01-1837-80/+119
| |
| * Apply ruff F category fixesAarni Koskela2023-01-185-7/+8
| |
| * Apply ruff E category fixesAarni Koskela2023-01-186-14/+20
| |
| * Apply ruff C category fixesAarni Koskela2023-01-183-16/+11
| |
| * Apply ruff B category fixesAarni Koskela2023-01-1810-21/+26
| |
| * Add baseline ruff configurationAarni Koskela2023-01-182-0/+18
| |
| * Ensure `path` is correctly bound for extract callback (flake8 B023)Aarni Koskela2023-01-181-19/+22
|/
* Renovate formatting in test_checkers and test_frontend (#950)Aarni Koskela2023-01-182-204/+147
|
* Minor cleanups (#948)Aarni Koskela2023-01-1816-53/+73
| | | | | * Add __all__s to be cleaner about re-exports * Move timezone_getter to conftest * Apply spelling corrections suggested by codespell
* Unify datetime imports (#945)Aarni Koskela2023-01-189-150/+223
| | | Co-authored-by: Jonah Lawrence <jonah@freshidea.com>
* Implement zoneinfo support and make pytz optional (#940)DS/Charlie2023-01-1115-211/+340
|
* Add type annotations (#934)Jonah Lawrence2023-01-1122-504/+958
| | | | | | | Refs e.g. https://github.com/python/typeshed/pull/9455 Co-authored-by: Spencer Brown <spencerb21@live.com> Co-authored-by: Aarni Koskela <akx@iki.fi>
* Enable pre-commit (#943)Aarni Koskela2023-01-115-20/+26
| | | | | | | * Update pre-commit config syntax * CI: run pre-commit * CI: set up pip caching
* fix typo (#941)lilinjie2023-01-091-1/+1
| | | Signed-off-by: lilinjie <lilinjie@uniontech.com>
* Fix compact singular formats and patterns with no numbers (#932)Jonah Lawrence2023-01-062-7/+19
|
* Improved javascript template string expression extracting (#939)Johannes Wilm2023-01-063-8/+94
| | | | Co-authored-by: Rik <gitaarik@posteo.net> Co-authored-by: Aarni Koskela <akx@iki.fi>
* ci: Fix testing dependencies (#936)Jonah Lawrence2022-12-271-1/+1
|
* Replace %/.format/concatenation with f-strings where feasible (#927)Aarni Koskela2022-11-2324-204/+161
| | | Original conversion suggestions via flynt, edited by hand.
* Cast number to Decimal in _get_compact_format (#930)Jonah Lawrence2022-11-231-2/+4
| | | | * fix rounding modes by using Decimal instead of float
* Drop support for EOL Python 3.6 (#919)Aarni Koskela2022-11-234-6/+4
|
* feat: Support for short compact currency formats (#926)Jonah Lawrence2022-11-047-12/+119
| | | | Co-authored-by: Jun Omae (大前 潤) <42682+jun66j5@users.noreply.github.com>
* Remove vestigial Python 2 `long` check (#925)Aarni Koskela2022-11-021-8/+1
|
* feat: Add `Format.compact_decimal` utility (#921)Jonah Lawrence2022-11-022-1/+17
|