mirror of https://github.com/astral-sh/ruff
[ty] clarify requirements for scope_id argument to in_type_expression (#18488)
This commit is contained in:
parent
cb8246bc5f
commit
db8db536f8
|
|
@ -4967,7 +4967,10 @@ impl<'db> Type<'db> {
|
||||||
/// `Type::ClassLiteral(builtins.int)`, that is, it is the `int` class itself. As a type
|
/// `Type::ClassLiteral(builtins.int)`, that is, it is the `int` class itself. As a type
|
||||||
/// expression, it names the type `Type::NominalInstance(builtins.int)`, that is, all objects whose
|
/// expression, it names the type `Type::NominalInstance(builtins.int)`, that is, all objects whose
|
||||||
/// `__class__` is `int`.
|
/// `__class__` is `int`.
|
||||||
pub fn in_type_expression(
|
///
|
||||||
|
/// The `scope_id` argument must always be a scope from the file we are currently inferring, so
|
||||||
|
/// as to avoid cross-module AST dependency.
|
||||||
|
pub(crate) fn in_type_expression(
|
||||||
&self,
|
&self,
|
||||||
db: &'db dyn Db,
|
db: &'db dyn Db,
|
||||||
scope_id: ScopeId<'db>,
|
scope_id: ScopeId<'db>,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue