![]() ![]() $ black -required-version 21.9b0 -c "format = 'this'" format = "this" $ black -required-version 31.5b2 -c "still = 'beta?!'" Oh no! □ □ □ The required version does not match the running version! Code input alternatives # Standard Input #īlack supports formatting code via stdin, with the result being printed to stdout. Pyproject.toml file (more on that below). Note that all command-line options listed above can also be configured using a ![]() config FILE Read configuration from FILE path. That were not changed or were ignored due to v, -verbose Also emit messages to stderr about files ![]() q, -quiet Don't emit non-error messages to stderr.Įrrors are still emitted silence those with W, -workers INTEGER RANGE Number of parallel workers [default: number stdin-filename TEXT The name of the file when passing it through Matching this regex will be excluded even force-exclude TEXT Like -exclude, but files and directories extend-exclude TEXT Like -exclude, but adds additional filesĪnd directories on top of the excluded ones. Use forward slashes forĭirectories on all platforms (Windows, too).Įxclusions are calculated first, inclusions exclude TEXT A regular expression that matches files and Use forward slashes for directories on all An empty value means allįiles are included regardless of the name. include TEXT A regular expression that matches files and Running (useful for unifying results across required-version TEXT Require a specific version of Black to be fast / -safe If -fast given, skip temporary sanity diff Don't write the files back, just output a Return code 1 means some files wouldīe reformatted. check Don't write the files back, just return the preview Enable potentially disruptive style changes x, -skip-source-first-line Skip the first line of the source code.ĭon't normalize string quotes or prefixes. python-cell-magics TEXT When processing Jupyter Notebooks, add theįormatting cells with custom python magics. ipynb Format all input files like Jupyter Regardless of file extension (useful when pyi Format all input files like typing stubs To infer this from the project metadata inĬonclusive results, Black will use per-file Python versions that should be supported byīlack's output. l, -line-length INTEGER How many characters per line to allow. c, -code TEXT Format the code passed in as a string. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |