mirror of
https://github.com/astral-sh/ruff
synced 2026-01-09 23:54:36 -05:00
## Summary Fix all but one empty line differences with the black preview style in typeshed. The remaining differences are breaking with type comments and trailing commas in function definitions. I compared the empty line differences with the preview mode of black since stable has some oddities that would have been hard to replicate (https://github.com/psf/black/issues/3861). Additionally, it assumes the style proposed in https://github.com/psf/black/issues/3862. An edge case that also surfaced with typeshed are newline before trailing module comments. **main** | project | similarity index | total files | changed files | |--------------|------------------:|------------------:|------------------:| | cpython | 0.76083 | 1789 | 1632 | | django | 0.99966 | 2760 | 58 | | transformers | 0.99930 | 2587 | 447 | | twine | 1.00000 | 33 | 0 | | **typeshed** | 0.99978 | 3496 | **2173** | | warehouse | 0.99825 | 648 | 22 | | zulip | 0.99950 | 1437 | 27 | **PR** | project | similarity index | total files | changed files | |--------------|------------------:|------------------:|------------------:| | cpython | 0.76083 | 1789 | 1632 | | django | 0.99966 | 2760 | 58 | | transformers | 0.99930 | 2587 | 447 | | twine | 1.00000 | 33 | 0 | | **typeshed** | 0.99983 | 3496 | **18** | | warehouse | 0.99825 | 648 | 22 | | zulip | 0.99950 | 1437 | 27 | Closes #6723 ## Test Plan The main driver was the typeshed diff. I added new test cases for all kinds of possible empty line combinations in stub files, test cases for newlines before trailing module comments. --------- Co-authored-by: Micha Reiser <micha@reiser.io>
20 lines
354 B
INI
20 lines
354 B
INI
# Check http://editorconfig.org for more information
|
|
# This is the main config file for this project:
|
|
root = true
|
|
|
|
[*]
|
|
charset = utf-8
|
|
trim_trailing_whitespace = true
|
|
end_of_line = lf
|
|
indent_style = space
|
|
insert_final_newline = true
|
|
indent_size = 2
|
|
|
|
[*.{rs,py,pyi}]
|
|
indent_size = 4
|
|
|
|
[*.snap]
|
|
trim_trailing_whitespace = false
|
|
|
|
[*.md]
|
|
max_line_length = 100 |