mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
Respect attribute chains when resolving builtin call paths (#9309)
## Summary When resolving `dict.__dict__`, we were discarding the `.__dict__` segment when computing the call path. ## Test Plan `cargo test`
This commit is contained in:
parent
ec88acc291
commit
00f3c7d1d5
5 changed files with 26 additions and 3 deletions
|
@ -15,7 +15,7 @@ use crate::analyze::type_inference::{PythonType, ResolvedPythonType};
|
|||
use crate::model::SemanticModel;
|
||||
use crate::{Binding, BindingKind};
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum Callable {
|
||||
Bool,
|
||||
Cast,
|
||||
|
@ -26,7 +26,7 @@ pub enum Callable {
|
|||
MypyExtension,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum SubscriptKind {
|
||||
/// A subscript of the form `typing.Literal["foo", "bar"]`, i.e., a literal.
|
||||
Literal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue