black
black copied to clipboard
The uncompromising Python code formatter
**Is your feature request related to a problem? Please describe.** A clear and concise In some cases one would want to put non-ASCII characters in source. This is most common...
**Describe the bug** This is not a bug, it is an efficiency issue. I'm using black to format code in VS Code on my laptop, and it seems to be...
### Description Fix for issue #3268, #2052 As per the Black spec > ### [The magic trailing comma](https://black.readthedocs.io/en/latest/the_black_code_style/current_style.html#the-magic-trailing-comma) > ... > However, there are cases where you put a short...
Hi, I was wondering if black.vim is able to integrate with vim's 'formatprg' option (:h 'formatprg'), which is supposed to be set to an external command to run when using...
**Describe the style change** **Examples in the current _Black_ style** ```python tests = [ ( BusinessHour(), { Timestamp("2014-07-04 15:00") + Nano(5): this_is_a_very_long_function("2014-07-04 16:00"), Timestamp("2014-07-04 16:00") + Nano(5): this_is_a_very_long_function("2014-07-04 16:00"), Timestamp("2014-07-04...
### Description Closes #3384 When trying to format a project from the outside, the verbose output shows says that there are symbolic links that points outside of the project, but...
**Describe the bug** When trying to format a project from the outside, the verbose output shows says that there are symbolic links that points outside of the project, but displays...
Thanks to `mypyc`, `black` runs twice as fast when installed by PyPI vs in a pre-commit hook https://github.com/pandas-dev/pandas/pull/49947 Would you be open to making a mirror repo, like [this one](https://github.com/charliermarsh/ruff-pre-commit)...
**Describe the bug** It reformats: ```python import os import re # fmt: skip import sys ``` to: ```python import os import re # fmt: skip import sys ``` Example: https://black.vercel.app/?version=stable&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4ACSAFtdAD2IimZxl1N_WlwxRhR7MSgE-ANVmAcXiiHH_vLVBv6H9oJYdLgh3uJSbWM1qliEV5h8ji5l4G2iqd5AHPniBCkwXU5Gi97RWyWgW8b3Yvc90k3x9wXSWeryKEAAAIvWais0zjPAAAF3kwEAAAAB02j7scRn-wIAAAAABFla...
**Black v22.12.0** [Playground link](https://black.vercel.app/?version=stable&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AHSANBdAD2IimZxl1N_WlbvK5V_eqFRW4CRvE_ODdXKwDuZ4swIg1ZDio5V3avNj11r09j3SSfRDrFDD3snarP8s3QoGA0-rvC-fyjpvJLEW252HCFlLKBe-_KSmU-ezEajcrxHyURWOH5oR6VXwDX3A67cQnqiAj1-IYrInH2Df-ICo5bBUUAFkNkDQ29QRyQdoOQ8lxdFgWAqtnF2TKA-fo1igwzdYisxNnOReYWaywZSnW1DvrVDEHH-dGL-xIzPx6yxrdePs4klzzKgrprNE2Z2fQAA96C_nEgWWC4AAewB0wMAALqOFKmxxGf7AgAAAAAEWVo=) ## Options `--line-length=88` `--safe` ## Input ```python def run(self): while True == self._doingathing: if False == self._doinganotherthing: some = code if (am - pm) > self._doingthisthing:...