-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command line option to check whether pyproject.toml would be reformatted #10
Comments
@kieran-ryan Hi, I found this repo on https://goodfirstissues.com May be it should be a solution for #16 as you mentioned and also #12. Do you have any thoughts about it? |
Hey @DariaZvereva, yes, please! Go for it! 😃 If you have any questions, just let me know. I've just implemented #12, so there's code to check whether reformatting will occur or not. My thoughts for the next steps are below, however I welcome you to think of the best way to implement this:
The 'diff' option (#16) might be something to take into consideration while implementing this, but can be tackled separately or fixed with this issue; though separately might be easier for issue resolution - but will leave that up to you. Just a note as well that once this is implemented and a new release is created from GitHub (pushing it to PyPI), I then plan to run the package against its own pyproject.toml and add the check option as a linting task in the GitHub workflow pipeline - ensuring validation - the same way I would expect users might use this feature. It may also be useful for the pre-commit support (#13). I also welcome your contributions, ideas, bugs and feedback; so feel free to create an Issue if anything you think should be implemented or if there's anything that you would really like to implement yourself. Thanks for your interest in the project! 👍 |
|
I would have shared the same opinion; though taking a look at other formatters, such as |
Ok, now this makes sense to me:) Let's keep a consistent behaviour across different formatters. |
Closed by PR #20 |
Like other Python formatters such as black and isort, having a command line option to check whether formatting would be applied - without actually applying formatting - would be useful for linting purposes, such as in a continuous integration pipeline, pre-commit git hook, or to check locally from the command line whether it is formatted correctly.
pyprojectsort --check
The text was updated successfully, but these errors were encountered: