mirror of https://github.com/astral-sh/ruff
add some doc-comments
This commit is contained in:
parent
b924cd6945
commit
0791678b07
|
|
@ -878,6 +878,20 @@ impl<'a> First<'a> {
|
||||||
/// )
|
/// )
|
||||||
/// ).all()
|
/// ).all()
|
||||||
/// ```
|
/// ```
|
||||||
|
///
|
||||||
|
/// In `preview`, we also track the position of the leftmost call or
|
||||||
|
/// subscript on an attribute in the chain and break just before the dot.
|
||||||
|
///
|
||||||
|
/// So, for example, we would get:
|
||||||
|
/// ```python
|
||||||
|
/// Blog.objects
|
||||||
|
/// .filter(
|
||||||
|
/// entry__headline__contains="Lennon",
|
||||||
|
/// ).filter(
|
||||||
|
/// entry__pub_date__year=2008,
|
||||||
|
/// )
|
||||||
|
/// ```
|
||||||
|
/// in the first summand above, and similarly in the second.
|
||||||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
|
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
|
||||||
pub enum CallChainLayout {
|
pub enum CallChainLayout {
|
||||||
/// The root of a call chain
|
/// The root of a call chain
|
||||||
|
|
@ -891,6 +905,8 @@ pub enum CallChainLayout {
|
||||||
NonFluent,
|
NonFluent,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Records information about the position of a call chain
|
||||||
|
/// element relative to the first call or subscript.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum AttributeState {
|
pub enum AttributeState {
|
||||||
CallsOrSubscriptsPreceding(u32),
|
CallsOrSubscriptsPreceding(u32),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue