#Hugo linked me here from the Black

1 messages ยท Page 1 of 1 (latest)

merry swallow
#

Well, if it's helpful, I can produce the full output (in thread hopefully it's okay ๐Ÿ™‚ )

#
tool.black.line-length contents:
120: 5755
88: 3578
79: 2876
100: 2714
80: 834
99: 811
119: 485
110: 359
90: 269
95: 169
140: 165
160: 112
127: 90
130: 86
125: 67
96: 54
89: 53
115: 51
132: 47
150: 45
200: 36
128: 33
98: 32
180: 29
78: 28
121: 22
105: 20
118: 18
92: 18
70: 13
108: 12
94: 12
'79': 11
72: 11
102: 9
85: 9
109: 9
159: 8
101: 7
84: 7
'97': 6
135: 5
122: 5
'120': 4
111: 4
'119': 4
104: 4
'88': 3
91: 3
240: 3
'100': 3
999: 3
142: 3
512: 3
82: 3
1000: 3
83: 3
172: 3
129: 3
73: 3
81: 3
250: 2
107: 2
93: 2
112: 2
192: 2
'142': 1
148: 1
149: 1
139: 1
126: 1
220: 1
165: 1
97: 1
500: 1
'200': 1
256: 1
185: 1
178: 1
113: 1
131: 1
10000: 1
151: 1
1000000: 1
179: 1
50: 1
86: 1
30: 1
75: 1
87: 1
54: 1
999999: 1
77: 1
188: 1
proven needle
#

thanks!

merry swallow
#
tool.black.line_length contents:
120: 131
100: 131
88: 120
79: 49
80: 20
99: 15
119: 11
94: 9
110: 9
160: 6
90: 5
140: 4
130: 4
150: 3
300: 2
200: 1
76: 1
72: 1
109: 1
128: 1
proven needle
#

is it easy to link to specific projects with unusual values? e.g. I kind of want to know who set it to 1000000

merry swallow
#

Sure, not in the way that I set my cli up, but it's in the db. I'll be setting that up soon(ish), I want to check similar things soon

proven needle
#

Don't worry about it if it's a lot of work for you, I'm just curious

molten chasm
#

30: 1
๐Ÿ˜ฌ

merry swallow
#

I also found this interesting (I was trying to set up a SchemaStore schema for black earlier):

tool.black.*:
line-length: 19076
target-version: 10838
exclude: 6735
include: 5848
skip-string-normalization: 2849
extend-exclude: 1129
target_version: 1079
preview: 664
line_length: 524
color: 396
force-exclude: 276
skip-magic-trailing-comma: 215
py36: 152
fast: 148
skip_string_normalization: 105
experimental-string-processing: 90
verbose: 85
safe: 85
quiet: 78
include_trailing_comma: 61
required-version: 57
multi_line_output: 46
max-line-length: 44
extend_exclude: 41
use_parentheses: 41
force_grid_wrap: 40
target-versions: 40
skip-numeric-underscore-normalization: 39
skip_magic_trailing_comma: 36
ensure_newline_before_comments: 35
python-version: 34
experimental_string_processing: 25
profile: 25
force_exclude: 17
diff: 15
includes: 13
extend-ignore: 12
py38: 11
py37: 10
line-lenght: 10
py39: 10
ignore: 9
check: 9
src_paths: 8
max_line_length: 8
exclue: 7
src: 6
workers: 6
packages: 6
required_version: 5
skip_numeric_underscore_normalization: 5
paths: 5
skip_gitignore: 5
skip: 5
target: 5
testpaths: 5
version: 5
use-tabs: 5
string-normalization: 5
jobs: 4
cache: 4
extend-include: 4
target-python: 3
format: 3
fix: 3
extend_excludes: 3
ignore_missing_imports: 3
target_versions: 3
atomic: 3
--line-length: 2
docstring-style: 2
target-verson: 2
string_normalization: 2
magic_trailing_comma: 2
addopts: 2
requires: 2

...

#
multi-line-output: 2
include-trailing-comma: 2
line-ngth: 2
disable: 2
length: 2
known_first_party: 2
indent_size: 2
kip-string-normalization: 2
length_sort: 2
executionEnvironments: 2
args: 2
use-single-quotes: 2
files: 1
check_untyped_defs: 1
disallow_any_generics: 1
disallow_incomplete_defs: 1
disallow_untyped_defs: 1
follow_imports: 1
no_implicit_optional: 1
no_implicit_reexport: 1
show_error_codes: 1
warn_redundant_casts: 1
warn_unreachable: 1
warn_unused_ignores: 1
skip_glob: 1
double-quotes: 1
build-backend: 1
max-doc-length: 1
indent: 1
filterwarnings: 1
disable_test_id_escaping_and_forfeit_all_rights_to_community_support: 1
reportWildcardImportFromLibrary: 1
revision: 1
isort: 1
log_level: 1
--skip-magic-trailing-comma: 1
lin-length: 1
source: 1
targer-version: 1
preview-string-processing: 1
pyi: 1
extended-include: 1
extended-exclude: 1
multiline: 1
github_url: 1
ling-length: 1
extended_exclude: 1
classifiers: 1
python_version: 1
SRC: 1
max-complexity: 1
indent_style: 1
insert-final-newline: 1
trim-trailing-whitespace: 1
quite: 1
extend-exlcude: 1
extend_skip: 1
excludes: 1
line-legth: 1
import-order: 1
reportMissingImports: 1
reportMissingTypeStubs: 1
pythonVersion: 1
pythonPlatform: 1
ipynb: 1
skip-line-normalization: 1
language-version: 1
unfixable: 1
single-quote: 1
skip-magin-trailing-comma: 1
py310: 1
py311: 1
python: 1
target-verstion: 1
README.md: 1
line-Length: 1
line_lenght: 1
line-lenghth: 1
ensure-newline-before-comments: 1
lines-after-imports: 1
#

(Hit the char limit for Discord there)

proven needle
#

Seems like the vast majority is in the 80-120 range, which doesn't make a ton of difference from the default. Very short line lengths can be useful for finding bugs, I use that in development sometimes

proven needle
#

Oh that is fun too, relevant to a PR I just merged that warns about unrecognized options

#

Some of those look like somebody put their pyright or mypy config in tool.black

merry swallow
#

Writing a schema is going to be annoying, since black accepts line-length=2, line_length="2" and even more stuff if it's a boolean. Both options will start showing up in tab completion in vscode and stuff. :/

proven needle
#

hm and I guess if we restrict it, then people will see errors if they use one of the other supported options

merry swallow
#

Haha, people have done everything imaginable if it doesn't produce an error (and sometimes if it does)

proven needle
merry swallow
#

We could make the schema more strict that reality, though SchemaStore doesn't like deviating too much from what a tool accepts

#

I believe I've contributed more than half of the pyproject.toml ones there at this point. ๐Ÿ™‚

#

(I'm slowly starting to work on the top items in the tool.* list. Minus pytest, since that kind of allows anything)

proven needle
#

We could probably deprecate support for setting line-length to a string, that just seems like a bad idea

#

Allowing only one of line_length and line-length might be a bit disruptive though

teal lotus
#

I guess setting a schema with something stricter would have the benefit that IDEs (at least PyCharm) would warn if you deviate? so encourage people to use the preferred ones?

merry swallow
#

IMO, it would be nice if bools had to be bools, numbers be numbers, etc. I think even if it was verbally deprecated, that might be enough to keep the schema more strict.

#

Yes, validate-pyproject (and repo-review, since validate-pyproject can function as a plugin for it) can check against the schemas, too.

#

By the way, tool.black.py36 = * doesn't do anything, does it?

#

I see a surprisingly large number of things like that

proven needle
#

I think it used to but we removed it

merry swallow
#

Ahh, that would explain it, okay

proven needle
#

as of the latest release we print a warning on unrecognized options

merry swallow
#

I'll target adding the schema to black, then, then contribute it to SchemaStore? I've usually done that if projects can generate the Schema from options. I could see if I could do that for black, I guess.

#

Black is Click based with a few modifications

teal lotus
#

there used to be a --py36 option before --target-version was introduced

merry swallow
#

I wonder if line-Length also works (guessing it depends on click)

proven needle
#

I am opening an issue about deprecating weird types and possibly underscore-based configs

merry swallow
#
tool.black.line-length = 1000000
verifydump 1.0.0
#
tool.black.line-length = 30
app1-akshay-kumar 0.1.0
#

(I've only included top-level pyproject.tomls from the highest release in this dataset, BTW)

proven needle
merry swallow
#

I expect they just didn't want any wrapping. There are other very large values (not many, but some).

proven needle
#

yes, that makes some sense

#

the line-length 30 one just looks like a toy project

merry swallow
#

I expect (hope?) most of the tails are toy projects or people testing things