3 ms·
I disagree with a few of Black's decisions, so I forked it to Lavender [0], which I keep up to date with the latest stable Black release (and use actively in al
by mintplant 7y ago
I disagree with a few of Black's decisions, so I forked it to Lavender [0], which I keep up to date with the latest stable Black release (and use actively in all my Python projects).
> Differences from Black
> - The default line length is 99 instead of 88 (configurable with --line-length).
> - Single quoted strings are preferred (configurable with --string-normalization none/single/double).
> - Empty lines between classes and defs are treated no differently from other code. The old behavior, which sometimes inserts double empty lines between them, remains available via --special-case-def-empty-lines.
> - The Vim plugin configuration variable for line length is named g:lavender_line_length instead of g:lavender_linelength, for consistency with the other configuration variable names.
[0] https://github.com/spinda/lavender https://github.com/spinda/lavender
- akvadrako 7y agoNice to hear. The single quote issue is the main thing that keeps me from using black. Double quotes are just too noisy.
- jp_sc 7y agoBlack can be configured to use single quotes. In fact, I think it's the only style configuration you can make.
- akvadrako 7y agoWhere do you see that? https://black.readthedocs.io/en/stable/the_black_code_style.html#strings https://black.readthedocs.io/en/stable/the_black_code_style....
- 00ajcr 7y agoI think it's the `--skip-string-normalization` flag which means "Don't normalize string quotes or prefixes".
- xapata 7y agoBut I want them normalized. Normalized to single quotes.
- dbcurtis 7y agoYes, this. I have early-stage cateracs, which by-and-latge is not an issue on my 40 inch monitor. But it does mean that my astigmatism drifts around monthly. My prescription changes faster than I can get new lenses cut. The BIGGEST ergonomic issue for my with Python is single versus double quotes. Double quotes are the difference between happily coding all day versus a headache at lunch time and 5% less done. Fuck Black.
- brainbag 7y agoCan you say more about how single quotes vs double quotes is helpful for you? I rarely write python, but I have a passion for accessibility and I'm curious about this.