Skip to content

Commit cab65b2

Browse files
authored
Replace row/column based Location with byte-offsets. (#3931)
1 parent ee91598 commit cab65b2

File tree

418 files changed

+6193
-7030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

418 files changed

+6193
-7030
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ indent_size = 2
1212

1313
[*.{rs,py}]
1414
indent_size = 4
15+
16+
[*.snap]
17+
trim_trailing_whitespace = false

Cargo.lock

Lines changed: 13 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ path-absolutize = { version = "3.0.14" }
3030
proc-macro2 = { version = "1.0.51" }
3131
quote = { version = "1.0.23" }
3232
regex = { version = "1.7.1" }
33+
ruff_text_size = { git = "https://github.com/charliermarsh/RustPython.git", rev = "c3147d2c1524ebd0e90cf1c2938d770314fd5a5a" }
3334
rustc-hash = { version = "1.1.0" }
34-
rustpython-common = { git = "https://github.com/RustPython/RustPython.git", rev = "c15f670f2c30cfae6b41a1874893590148c74bc4" }
35-
rustpython-parser = { features = [
36-
"lalrpop",
37-
"serde",
38-
], git = "https://github.com/RustPython/RustPython.git", rev = "c15f670f2c30cfae6b41a1874893590148c74bc4" }
35+
rustpython-common = { git = "https://github.com/charliermarsh/RustPython.git", rev = "c3147d2c1524ebd0e90cf1c2938d770314fd5a5a" }
36+
rustpython-parser = { git = "https://github.com/charliermarsh/RustPython.git", rev = "c3147d2c1524ebd0e90cf1c2938d770314fd5a5a" }
3937
schemars = { version = "0.8.12" }
4038
serde = { version = "1.0.152", features = ["derive"] }
4139
serde_json = { version = "1.0.93", features = ["preserve_order"] }

crates/ruff/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ name = "ruff"
1717
ruff_cache = { path = "../ruff_cache" }
1818
ruff_diagnostics = { path = "../ruff_diagnostics", features = ["serde"] }
1919
ruff_macros = { path = "../ruff_macros" }
20-
ruff_python_ast = { path = "../ruff_python_ast" }
20+
ruff_python_ast = { path = "../ruff_python_ast", features = ["serde"] }
2121
ruff_python_semantic = { path = "../ruff_python_semantic" }
2222
ruff_python_stdlib = { path = "../ruff_python_stdlib" }
2323
ruff_rustpython = { path = "../ruff_rustpython" }
24-
ruff_text_size = { path = "../ruff_text_size" }
24+
ruff_text_size = { workspace = true }
2525

2626
annotate-snippets = { version = "0.9.1", features = ["color"] }
2727
anyhow = { workspace = true }

crates/ruff/resources/test/fixtures/pycodestyle/W505.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def f():
99

1010
# Here's a standalone comment that's over the limit.
1111

12+
x = 2
13+
# Another standalone that is preceded by a newline and indent toke and is over the limit.
14+
1215
print("Here's a string that's over the limit, but it's not a docstring.")
1316

1417

0 commit comments

Comments
 (0)