Add cpython Lib/ repository config into primer config - Disabled#2429
Conversation
- cpython tests is probably the best repo for black to test on as the stdlib's unittests should use all syntax
- Limit to running in recent versions of the python runtime - e.g. today >= 3.9
- This allows us to parse more syntax
- Exclude all failing files for now
- Definately have bugs to explore there - Refer to #2407 for more details there
- Some test files on purpose have syntax errors, so we will never be able to parse them
- Add new black command arguments logging in debug mode; very handy for seeing how CLI arguments are formatted
cython now succeeds ignoring 16 files:
```
Oh no! 💥 💔 💥
1859 files would be reformatted, 148 files would be left unchanged.
```
Testing
- Ran locally with and without string processing - Very little runtime difference BUT 3 more failed files
```
time /tmp/tb/bin/black --experimental-string-processing --check . 2>&1 | tee /tmp/black_cpython_esp
...
Oh no! 💥 💔 💥
1859 files would be reformatted, 148 files would be left unchanged, 16 files would fail to reformat.
real 4m8.563s
user 16m21.735s
sys 0m6.000s
```
- Add unittest for new covienence config file flattening that allows long arguments to be broke up into an array/list of strings
Addresses #2407
- If present, will set forked process limit to that value in seconds - Otherwise, stay with default 10 minutes (600 seconds)
- Rather than start at the repo root start at a configured path within the repository - e.g. for cpython only run black on `Lib`
…config for others to use
|
Not going to work. But since I did all the work diagnosing all the files we break on, I'd love to leave the config so interested people could use this to fix the bugs it exposes ... But can give up if people don't want the noise there. |
|
So, should I close this or do we want to merge for people to use in the future when people have cycles for potentially looking into the bugs this finds? |
I don't know how likely it is people will look into the discovered issues, but this can't possibly hurt and would be useful so I'm merging. |
ichard26
left a comment
There was a problem hiding this comment.
Hopefully my edit via the web interface doesn't break the tests. Will merge afterwards.
| args_as_str = "".join(arg) | ||
| flat_args.append(args_as_str) |
There was a problem hiding this comment.
Nice - Much more pythonic
cython now succeeds ignoring 16 files:
Testing
Addresses #2407