-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Public programmatic api #292
Comments
You should be able to depend on black as a library and use format_str for this for now, but you probably already figured this out. So your real question seems to be how stable do we expect these APIs to be. I think until we're out of beta we won't give any promises, but I'll let @ambv give you a definitive answer |
Yep, definitely found that -- though it's not documented anywhere and I wasn't sure about the stability there. |
Anthony, we don't define That being said, if you are using |
Hi friends, I made a terrific (terrible? terrifying?) thing. I needed one manual `,` addition to the `setup.py` example so it could be parsed -- otherwise this is fully automated! Using the new thing I made today: https://github.com/asottile/blacken-docs Heavily inspired by pytest-dev/pytest#3525. See also psf/black#292, psf/black#294.
Cool, this wasn't so bad. In all I needed: |
I'd like to use the functionality of black to apply to unique cases where black is (probably) not interested in covering.
The specific example I had in mind, was parsing out
.. code-block:: python
portions in.rst
files or fencedpython
blocks in markdown and formatting them.Initial idea inspired from here
The text was updated successfully, but these errors were encountered: