mirror of
https://github.com/astral-sh/ruff
synced 2026-01-07 14:44:17 -05:00
[ruff] Fix false positive on global keyword (RUF052) (#15235)
This commit is contained in:
@@ -445,7 +445,7 @@ impl Ranged for Binding<'_> {
|
||||
|
||||
/// ID uniquely identifying a [Binding] in a program.
|
||||
///
|
||||
/// Using a `u32` to identify [Binding]s should is sufficient because Ruff only supports documents with a
|
||||
/// Using a `u32` to identify [Binding]s should be sufficient because Ruff only supports documents with a
|
||||
/// size smaller than or equal to `u32::max`. A document with the size of `u32::max` must have fewer than `u32::max`
|
||||
/// bindings because bindings must be separated by whitespace (and have an assignment).
|
||||
#[newtype_index]
|
||||
|
||||
@@ -1505,7 +1505,7 @@ impl<'a> SemanticModel<'a> {
|
||||
kind: BindingKind::Assignment,
|
||||
range: *range,
|
||||
references: Vec::new(),
|
||||
scope: self.scope_id,
|
||||
scope: ScopeId::global(),
|
||||
source: self.node_id,
|
||||
context: self.execution_context(),
|
||||
exceptions: self.exceptions(),
|
||||
|
||||
Reference in New Issue
Block a user