Visitar URL original
Update ruff to `0.15.6` (#7427) · youknowone/RustPython@8d69853 · GitHub
Skip to content

Commit 8d69853

Browse files
authored
Update ruff to 0.15.6 (RustPython#7427)
* Update ruff to `0.15.6` * Unmark passing tests
1 parent 9f400de commit 8d69853

5 files changed

Lines changed: 22 additions & 15 deletions

File tree

‎Cargo.lock‎

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

‎Cargo.toml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ rustpython-sre_engine = { path = "crates/sre_engine", version = "0.4.0" }
156156
rustpython-wtf8 = { path = "crates/wtf8", version = "0.4.0" }
157157
rustpython-doc = { path = "crates/doc", version = "0.4.0" }
158158

159-
# Ruff tag 0.15.5 is based on commit 5e4a3d9c3b381df20f6a52caef0f56ed0ebc74be
159+
# Ruff tag 0.15.6 is based on commit e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675
160160
# at the time of this capture. We use the commit hash to ensure reproducible builds.
161-
ruff_python_parser = { git = "https://github.com/astral-sh/ruff.git", rev = "5e4a3d9c3b381df20f6a52caef0f56ed0ebc74be" }
162-
ruff_python_ast = { git = "https://github.com/astral-sh/ruff.git", rev = "5e4a3d9c3b381df20f6a52caef0f56ed0ebc74be" }
163-
ruff_text_size = { git = "https://github.com/astral-sh/ruff.git", rev = "5e4a3d9c3b381df20f6a52caef0f56ed0ebc74be" }
164-
ruff_source_file = { git = "https://github.com/astral-sh/ruff.git", rev = "5e4a3d9c3b381df20f6a52caef0f56ed0ebc74be" }
161+
ruff_python_parser = { git = "https://github.com/astral-sh/ruff.git", rev = "e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675" }
162+
ruff_python_ast = { git = "https://github.com/astral-sh/ruff.git", rev = "e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675" }
163+
ruff_text_size = { git = "https://github.com/astral-sh/ruff.git", rev = "e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675" }
164+
ruff_source_file = { git = "https://github.com/astral-sh/ruff.git", rev = "e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675" }
165165

166166
phf = { version = "0.13.1", default-features = false, features = ["macros"]}
167167
ahash = "0.8.12"

‎Lib/test/test_unpack_ex.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,27 +148,27 @@
148148
[0, 1, 2, 3, 4]
149149
150150
>>> l = [a, (3, 4), {5}, {6: None}, (i for i in range(7, 10))]
151-
>>> [*item for item in l] # TODO: RUSTPYTHON # doctest:+EXPECTED_FAILURE
151+
>>> [*item for item in l]
152152
Traceback (most recent call last):
153153
...
154154
SyntaxError: iterable unpacking cannot be used in comprehension
155155
156-
>>> [*[0, 1] for i in range(10)] # TODO: RUSTPYTHON # doctest:+EXPECTED_FAILURE
156+
>>> [*[0, 1] for i in range(10)]
157157
Traceback (most recent call last):
158158
...
159159
SyntaxError: iterable unpacking cannot be used in comprehension
160160
161-
>>> [*'a' for i in range(10)] # TODO: RUSTPYTHON # doctest:+EXPECTED_FAILURE
161+
>>> [*'a' for i in range(10)]
162162
Traceback (most recent call last):
163163
...
164164
SyntaxError: iterable unpacking cannot be used in comprehension
165165
166-
>>> [*[] for i in range(10)] # TODO: RUSTPYTHON # doctest:+EXPECTED_FAILURE
166+
>>> [*[] for i in range(10)]
167167
Traceback (most recent call last):
168168
...
169169
SyntaxError: iterable unpacking cannot be used in comprehension
170170
171-
>>> {**{} for a in [1]} # TODO: RUSTPYTHON # doctest:+EXPECTED_FAILURE
171+
>>> {**{} for a in [1]} # TODO: RUSTPYTHON # doctest: +EXPECTED_FAILURE
172172
Traceback (most recent call last):
173173
...
174174
SyntaxError: dict unpacking cannot be used in dict comprehension

‎crates/stdlib/src/_tokenize.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,7 @@ mod _tokenize {
750750
TokenKind::TStringMiddle => 63,
751751
TokenKind::TStringEnd => 64,
752752
TokenKind::IpyEscapeCommand | TokenKind::Question | TokenKind::Unknown => 67, // ERRORTOKEN
753+
TokenKind::Lazy => u8::MAX, // Placeholder: RustPython Doesn't support `lazy imports` yet
753754
}
754755
}
755756
}

‎crates/vm/src/stdlib/_ast/statement.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ impl Node for ast::StmtImport {
10431043
node_index: _,
10441044
names,
10451045
range: _range,
1046+
is_lazy: _,
10461047
} = self;
10471048
let node = NodeAst
10481049
.into_ref_with_type(_vm, pyast::NodeStmtImport::static_type().to_owned())
@@ -1053,6 +1054,7 @@ impl Node for ast::StmtImport {
10531054
node_add_location(&dict, _range, _vm, source_file);
10541055
node.into()
10551056
}
1057+
10561058
fn ast_from_object(
10571059
_vm: &VirtualMachine,
10581060
source_file: &SourceFile,
@@ -1066,6 +1068,7 @@ impl Node for ast::StmtImport {
10661068
get_node_field(_vm, &_object, "names", "Import")?,
10671069
)?,
10681070
range: range_from_object(_vm, source_file, _object, "Import")?,
1071+
is_lazy: false, // Placeholder
10691072
})
10701073
}
10711074
}
@@ -1078,6 +1081,7 @@ impl Node for ast::StmtImportFrom {
10781081
names,
10791082
level,
10801083
range,
1084+
is_lazy: _,
10811085
} = self;
10821086
let node = NodeAst
10831087
.into_ref_with_type(vm, pyast::NodeStmtImportFrom::static_type().to_owned())
@@ -1092,6 +1096,7 @@ impl Node for ast::StmtImportFrom {
10921096
node_add_location(&dict, range, vm, source_file);
10931097
node.into()
10941098
}
1099+
10951100
fn ast_from_object(
10961101
vm: &VirtualMachine,
10971102
source_file: &SourceFile,
@@ -1120,6 +1125,7 @@ impl Node for ast::StmtImportFrom {
11201125
.transpose()?
11211126
.unwrap_or(0),
11221127
range: range_from_object(vm, source_file, _object, "ImportFrom")?,
1128+
is_lazy: false, // Placeholder
11231129
})
11241130
}
11251131
}

0 commit comments

Comments
 (0)