You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Thanks for maintaining blacken-docs -- it's a great project!
Black supports a --pyi flag; if you pass this flag, it formats all code as if it were a .pyi stub file. (In practice, this results in more concise formatting with fewer blank lines.) I'm working on a project where we'd ideally like our Python examples in Markdown files formatted quite concisely, as if they were stubs. However, there doesn't seem to be any way currently to do this: black-as-invoked-by-blacken-docs doesn't take notice of black configuration options in a [tool.black] pyproject.toml table (I think because you're invoking Black as a library rather than as a subprocess), and blacken-docs has no flag or config option to format docs examples as stubs.
Would you be open to adding a --pyi flag to blacken-docs, that would simply be passed directly on to Black? (I'd be very happy to submit a PR, if so!)
The text was updated successfully, but these errors were encountered:
Description
Hi! Thanks for maintaining blacken-docs -- it's a great project!
Black supports a
--pyi
flag; if you pass this flag, it formats all code as if it were a.pyi
stub file. (In practice, this results in more concise formatting with fewer blank lines.) I'm working on a project where we'd ideally like our Python examples in Markdown files formatted quite concisely, as if they were stubs. However, there doesn't seem to be any way currently to do this: black-as-invoked-by-blacken-docs doesn't take notice of black configuration options in a[tool.black]
pyproject.toml table (I think because you're invoking Black as a library rather than as a subprocess), and blacken-docs has no flag or config option to format docs examples as stubs.Would you be open to adding a
--pyi
flag to blacken-docs, that would simply be passed directly on to Black? (I'd be very happy to submit a PR, if so!)The text was updated successfully, but these errors were encountered: