This PR re-introduces an public Python API.
The API was changed to be modelled after pyproject-fmt-rust, but it adds conveniences such as default configuration values + the ability for reading configuration from the file being formatted.
In terms of implementation, some functionalities from the cli module were moved/refactored into the new module.
Please take this as just an example on how things could work (and I am sure that there is a bunch of bike-shedding to be discussed). Please also feel free to close this PR if the approach is too far from what is acceptable, and also please feel free to steal parts of the PR to create something different.
This PR re-introduces an public Python API. The API was changed to be modelled after
pyproject-fmt-rust
, but it adds conveniences such as default configuration values + the ability for reading configuration from the file being formatted.The motivation and use case are described in #3 and https://github.com/tox-dev/pyproject-fmt/issues/200#issuecomment-2108530014.
In terms of implementation, some functionalities from the
cli
module were moved/refactored into the new module.Please take this as just an example on how things could work (and I am sure that there is a bunch of bike-shedding to be discussed). Please also feel free to close this PR if the approach is too far from what is acceptable, and also please feel free to steal parts of the PR to create something different.