ruff/crates
Charlie Marsh badbfb2d3e
Skip BOM when determining Locator's line starts (#6159)
## Summary

If a file has a BOM, the import sorter _always_ reports the imports as
unsorted. The acute issue is that we detect that the line has leading
content (before the imports), which we always consider a violation.
Rather than fixing that one site, this PR instead makes `.line_start`
BOM-aware.

Fixes https://github.com/astral-sh/ruff/issues/6155.
2023-07-29 11:47:13 +00:00
..
flake8_to_ruff Bump version to 0.0.280 (#5965) 2023-07-21 22:36:13 -04:00
ruff Skip BOM when determining Locator's line starts (#6159) 2023-07-29 11:47:13 +00:00
ruff_benchmark Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_cache Only use a single cache file per Python package (#5117) 2023-06-19 17:46:13 +02:00
ruff_cli Implement --diff for Jupyter Notebooks (#6149) 2023-07-29 04:22:56 +00:00
ruff_dev Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_diagnostics Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_formatter Respect indent when measuring with MeasureMode::AllLines (#6120) 2023-07-27 10:22:13 -04:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Remove parser dependency from ruff-python-ast (#6096) 2023-07-26 17:47:22 +02:00
ruff_python_ast Ignore end-of-line file exemption comments (#6160) 2023-07-29 00:40:32 +00:00
ruff_python_codegen Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_python_formatter Ignore end-of-line file exemption comments (#6160) 2023-07-29 00:40:32 +00:00
ruff_python_index Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_python_literal Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_python_parser Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_python_resolver Avoid walking past root when resolving imports (#6126) 2023-07-27 10:22:13 -04:00
ruff_python_semantic Add semantic analysis of type aliases and parameters (#6109) 2023-07-28 17:06:37 -05:00
ruff_python_stdlib Fix logging rules with whitespace around dot (#6022) 2023-07-24 05:14:48 +00:00
ruff_python_trivia Ignore end-of-line file exemption comments (#6160) 2023-07-29 00:40:32 +00:00
ruff_shrinking Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_source_file Skip BOM when determining Locator's line starts (#6159) 2023-07-29 11:47:13 +00:00
ruff_text_size Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00
ruff_wasm Pull in RustPython parser (#6099) 2023-07-27 09:29:11 +00:00