]> git.ipfire.org Git - thirdparty/babel.git/commit
Initial support for reading mapping configuration as TOML (#1108)
authorAarni Koskela <akx@iki.fi>
Wed, 7 Aug 2024 09:46:55 +0000 (12:46 +0300)
committerGitHub <noreply@github.com>
Wed, 7 Aug 2024 09:46:55 +0000 (12:46 +0300)
commitd26a669826d6c963dfdc21ae09e8cd5659fc95e2
tree29f4eff8792b95ff0d53bf3fb082184aeb474810
parent34ed517de44cf3c3002f3b69713b1693d329646d
Initial support for reading mapping configuration as TOML (#1108)

* Rename parse_mapping to parse_mapping_cfg and remove duplicated test
* Add initial support for TOML mapping configuration (prefer tomllib to tomli)

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
15 files changed:
babel/messages/frontend.py
tests/messages/test_frontend.py
tests/messages/test_toml_config.py [new file with mode: 0644]
tests/messages/toml-test-cases/bad.extractor.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.extractors-not-a-dict.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.just-a-mapping.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.mapping-not-a-dict.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.mappings-not-a-list.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.missing-extraction-method.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.multiple-mappings-not-a-list.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.non-string-extraction-method.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.pattern-type-2.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.pattern-type.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.pyproject-without-tool-babel.toml [new file with mode: 0644]
tests/messages/toml-test-cases/bad.standalone-with-babel-prefix.toml [new file with mode: 0644]