Comments (5)
it probably could manually but wasn't implemented as black doesn't expose their config loading code (and many of black's options are irrelevant or even incorrect for blacken-docs (such as file filtering)) -- a patch would be accepted for the three supported options: -l / -t / -S
from blacken-docs.
Instead of calling black through python this tool could call black through subprocess.Popen
and pass the string to format through stdin. This allows leveraging all black configuration features with low effort of maintaining since this approach uses the official interface.
I can prepare a PR for that if this change is wanted.
from blacken-docs.
it is not wanted, that would be extremely slow
from blacken-docs.
it is not wanted, that would be extremely slow
While keeping multiple configuration files in sync is extremly error prone.
from blacken-docs.
feel free to fork the software if you want to maintain such a thing. I cannot accept that trade off and it will not work correctly in all cases given what I said in the comment directly above yours
from blacken-docs.
Related Issues (20)
- A `--check` mode would be useful HOT 3
- Add option or switch default to use the same exit code behaviour as `black` HOT 3
- line number error with code-block:: python HOT 4
- Transform pandoc-style class injection/fenced code blocks HOT 2
- blacking docs with plot code directives HOT 1
- PS to #62 HOT 1
- Support black's --experimental-string-processing flag HOT 1
- Support for docstring inside docstrings HOT 1
- Add possibilities to skip blocks and lines? HOT 3
- RST: Detect `::` signifying default language code-block. HOT 12
- "--dry-run" flag HOT 7
- reStructuredText literal blocks within other directives
- Option to extend code block types HOT 7
- Blacken-docs does not work with tabbed indentation HOT 2
- Blacken-docs removes lines at beginning and end of codeblocks, thereby destroying the rst HOT 3
- Different exit codes for syntax errors and linting changes HOT 1
- Support formatting python code cells in Quarto document (`.qmd` extensions) HOT 1
- Fix incorrect README.md instruction HOT 2
- multi-line strings lead to incorrect syntax HOT 1
- Add support for notebook style code HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blacken-docs.