• Jake Kaufman's avatar
    Add '-' param to read from stdin · 00d404e4
    Jake Kaufman yazdı
    Tools like ALE and so forth generally pass the buffer of the editor
    directly to the tool to edit and expect to read it back on stdout. I've
    added the `-` to signal to add-trailing-comma to read data from stdin
    and output to stdout.
    
    I modeled this mostly off of black. Black doesn't have any error
    handling around passing multiple files and `-`. Black also only briefly
    mentions it in the docs.
    
    I've also added a basic tests to check that a (mocked) stdin works.
    00d404e4
Adı
Son kayıt (commit)
Son güncelleme
tests Loading commit data...
.coveragerc Loading commit data...
.gitignore Loading commit data...
.pre-commit-config.yaml Loading commit data...
.pre-commit-hooks.yaml Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
add_trailing_comma.py Loading commit data...
azure-pipelines.yml Loading commit data...
requirements-dev.txt Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...
tox.ini Loading commit data...