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
14 files changed
tree: 991a5383f22c98669d74c6ce9727c74279f3afdf
  1. .github/
  2. docs/
  3. tomlkit/
  4. .coveragerc
  5. .flake8
  6. .gitignore
  7. .gitmodules
  8. .pre-commit-config.yaml
  9. CHANGELOG.md
  10. LICENSE
  11. poetry.lock
  12. pyproject.toml
  13. README.md
  14. tox.ini
README.md

GitHub Release PyPI Version Python Versions License
Tests

TOML Kit - Style-preserving TOML library for Python

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.

Usage

See the documentation for more information.

Installation

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

Running tests

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