mirror of
https://github.com/astral-sh/ruff
synced 2026-01-20 21:10:48 -05:00
Use nightly rustfmt with rustfmt.toml (#536)
This commit is contained in:
@@ -153,8 +153,8 @@ pub const BUILTINS: &[&str] = &[
|
||||
"zip",
|
||||
];
|
||||
|
||||
// Globally defined names which are not attributes of the builtins module, or are only present on
|
||||
// some platforms.
|
||||
// Globally defined names which are not attributes of the builtins module, or
|
||||
// are only present on some platforms.
|
||||
pub const MAGIC_GLOBALS: &[&str] = &[
|
||||
"WindowsError",
|
||||
"__annotations__",
|
||||
|
||||
@@ -186,7 +186,8 @@ pub fn match_annotated_subscript(
|
||||
None
|
||||
}
|
||||
|
||||
/// Returns `true` if `Expr` represents a reference to a typing object with a PEP 585 built-in.
|
||||
/// Returns `true` if `Expr` represents a reference to a typing object with a
|
||||
/// PEP 585 built-in.
|
||||
pub fn is_pep585_builtin(expr: &Expr, typing_imports: Option<&BTreeSet<&str>>) -> bool {
|
||||
match &expr.node {
|
||||
ExprKind::Attribute { attr, value, .. } => {
|
||||
|
||||
Reference in New Issue
Block a user