commit | 9f89ef1e30401baa1fd54d7662827427c9288581 | [log] [tgz] |
---|---|---|
author | Bartosz Sokorski <b.sokorski@gmail.com> | Thu Jul 28 05:39:35 2022 +0200 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Oct 25 14:02:24 2023 -0700 |
tree | 991a5383f22c98669d74c6ce9727c74279f3afdf | |
parent | d0e5c98223fdd2473f204b04d59ab4d9c065d44e [diff] |
chore: Multiple code quality improvements (#212) * Add pre-commit config * First pre-commit swipe (isort, flake8-bugbear, black, pyupgrade) * Flake8-broken-line and flake8-comprehensions * Flake8-eradicate, flake8-simplify, pep8-naming * flake8-use-fstring * flake8-tidy-imports, flake8-quotes * flake8-typing-imports, flake8-type-checking * pycln * Remove unnecessary comments * Update versions of plugins * Code review changes - removed `exclude` from `pycln` pre-commit config - removed adding of futture-annotations import from isort config - added `TOMLDocument` to `__all__` list in tomlkit/__init__.py * Revert "First pre-commit swipe (isort, flake8-bugbear, black, pyupgrade)" This reverts commit 60abdac8b3b54dede22ef9f6c3e365c890062e91. * Remove unnecessary option * Remove unnecessary isort config option * Fix tests GitOrigin-RevId: 0449c53058349b8c407f2e2b3d89ee0d036afbf1 Change-Id: I652bc13915a8e22bc397eefe33eb00687457df6d
TOML Kit is a 1.0.0-compliant TOML library.
It includes a parser that preserves all comments, indentations, whitespace and internal element ordering, and makes them accessible and editable via an intuitive API.
You can also create new TOML documents from scratch using the provided helpers.
Part of the implementation has been adapted, improved and fixed from Molten.
See the documentation for more information.
If you are using Poetry, add tomlkit
to your pyproject.toml
file by using:
poetry add tomlkit
If not, you can use pip
:
pip install tomlkit
Please clone the repo with submodules with the following command git clone --recurse-submodules https://github.com/sdispater/tomlkit.git
. We need the submodule - toml-test
for running the tests.
You can run the tests with poetry run pytest -q tests