tomlkit icon indicating copy to clipboard operation
tomlkit copied to clipboard

Style-preserving TOML library for Python

Results 29 tomlkit issues
Sort by recently updated
recently updated
newest added

Bug: ``` >>> d = tomlkit.parse('x=-3.1415') >>> d['x'] *= -1 >>> print(tomlkit.dumps(d)) ``` returns: ``` a=+3.1415 >>> d['x'] *= -1 >>> print(tomlkit.dumps(d)) ``` returns: ``` a=--3.1415 ``` Subsequent parsing raises...

Hello I have two questions regarding comments in multiline arrays (for which I couldn't find documentation). I'm using tomlkit 0.12.4. Consider the following code: ``` import tomlkit content = """[foo]...

When there are sections defined out of order, it seems `tomlkit` does not like it. Original issue was reported at https://github.com/python-poetry/poetry/issues/4718. The following code runs without issues, however does not...

TOML allows an underscore anywhere in an integer, [as long as there is a digit each side of it](https://toml.io/en/v1.0.0#integer): > For large numbers, you may use underscores between digits to...

The failures: ``` =================================== FAILURES =================================== _________________________ test_dates_behave_like_dates _________________________ def test_dates_behave_like_dates(): i = item(date(2018, 7, 22)) assert i == date(2018, 7, 22) assert i.as_string() == "2018-07-22" i += timedelta(days=1) >...

I want to group my tables: ```toml [first] foo = 5 bar = 20 [first.a.b.c] alice = 10 bob = 30 [second] foo = 3 bar = 21 [second.a.b.c] alice...

When using tomlkit to modify a tomldocument, mypy throws a bunch of errors that I don't know how to fix. Example: ```python import tomlkit from pathlib import Path path =...

This is the same as https://github.com/sdispater/tomlkit/issues/112 , but I reproduced the issue using the current release (0.12.3). Not sure if it's a bug or if there's an option I don't...

~The [Python 3.12 release candidate](https://discuss.python.org/t/python-3-12-0-release-candidate-1-released/31137?u=hugovk) is out! :rocket:~ > ## Call to action > > We strongly encourage maintainers of third-party Python projects to prepare their projects for 3.12 compatibilities...

Hello, I am using the tomlkit Python library to modify an existing TOML file. The original file looks like this: ``` ## My POST route comment [[routes]] method = 'POST'...