Skip to content

Commit 43554e2

Browse files
committed
fix docs
1 parent 7aaeb47 commit 43554e2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

crates/red_knot_python_semantic/src/types/class.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ impl<'db> ClassType<'db> {
229229
///
230230
/// If the MRO could not be accurately resolved, this method falls back to iterating
231231
/// over an MRO that has the class directly inheriting from `Unknown`. Use
232-
/// [`Class::try_mro`] if you need to distinguish between the success and failure
232+
/// [`ClassLiteralType::try_mro`] if you need to distinguish between the success and failure
233233
/// cases rather than simply iterating over the inferred resolution order for the class.
234234
///
235235
/// [method resolution order]: https://docs.python.org/3/glossary.html#term-method-resolution-order
@@ -281,7 +281,7 @@ impl<'db> ClassType<'db> {
281281
/// or those marked as ClassVars are considered.
282282
///
283283
/// Returns [`Symbol::Unbound`] if `name` cannot be found in this class's scope
284-
/// directly. Use [`Class::class_member`] if you require a method that will
284+
/// directly. Use [`ClassType::class_member`] if you require a method that will
285285
/// traverse through the MRO until it finds the member.
286286
pub(super) fn own_class_member(self, db: &'db dyn Db, name: &str) -> SymbolAndQualifiers<'db> {
287287
let (class_literal, _) = self.class_literal(db);
@@ -499,7 +499,7 @@ impl<'db> ClassLiteralType<'db> {
499499
///
500500
/// If the MRO could not be accurately resolved, this method falls back to iterating
501501
/// over an MRO that has the class directly inheriting from `Unknown`. Use
502-
/// [`Class::try_mro`] if you need to distinguish between the success and failure
502+
/// [`ClassLiteralType::try_mro`] if you need to distinguish between the success and failure
503503
/// cases rather than simply iterating over the inferred resolution order for the class.
504504
///
505505
/// [method resolution order]: https://docs.python.org/3/glossary.html#term-method-resolution-order
@@ -744,7 +744,7 @@ impl<'db> ClassLiteralType<'db> {
744744
/// or those marked as ClassVars are considered.
745745
///
746746
/// Returns [`Symbol::Unbound`] if `name` cannot be found in this class's scope
747-
/// directly. Use [`Class::class_member`] if you require a method that will
747+
/// directly. Use [`ClassLiteralType::class_member`] if you require a method that will
748748
/// traverse through the MRO until it finds the member.
749749
pub(super) fn own_class_member(self, db: &'db dyn Db, name: &str) -> SymbolAndQualifiers<'db> {
750750
let body_scope = self.body_scope(db);

crates/red_knot_python_semantic/src/types/mro.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ use crate::Db;
2626
/// class D[U](C[U]): ...
2727
/// ```
2828
///
29-
/// See [`Class::iter_mro`] for more details.
29+
/// See [`ClassType::iter_mro`] for more details.
3030
#[derive(PartialEq, Eq, Clone, Debug, salsa::Update)]
3131
pub(super) struct Mro<'db>(Box<[ClassBase<'db>]>);
3232

3333
impl<'db> Mro<'db> {
3434
/// Attempt to resolve the MRO of a given class. Because we derive the MRO from the list of
3535
/// base classes in the class definition, this operation is performed on a [class
36-
/// literal][ClassLiteral], not a [class type][ClassType]. (You can _also_ get the MRO of a
36+
/// literal][ClassLiteralType], not a [class type][ClassType]. (You can _also_ get the MRO of a
3737
/// class type, but this is done by first getting the MRO of the underlying class literal, and
3838
/// specializing each base class as needed if the class type is a generic alias.)
3939
///
@@ -220,7 +220,7 @@ impl<'db> FromIterator<ClassBase<'db>> for Mro<'db> {
220220
///
221221
/// Even for first-party code, where we will have to resolve the MRO for every class we encounter,
222222
/// loading the cached MRO comes with a certain amount of overhead, so it's best to avoid calling the
223-
/// Salsa-tracked [`Class::try_mro`] method unless it's absolutely necessary.
223+
/// Salsa-tracked [`ClassLiteralType::try_mro`] method unless it's absolutely necessary.
224224
pub(super) struct MroIterator<'db> {
225225
db: &'db dyn Db,
226226

@@ -326,7 +326,7 @@ pub(super) enum MroErrorKind<'db> {
326326

327327
/// The class has one or more duplicate bases.
328328
///
329-
/// This variant records the indices and [`Class`]es
329+
/// This variant records the indices and [`ClassLiteralType`]s
330330
/// of the duplicate bases. The indices are the indices of nodes
331331
/// in the bases list of the class's [`StmtClassDef`](ruff_python_ast::StmtClassDef) node.
332332
/// Each index is the index of a node representing a duplicate base.

0 commit comments

Comments
 (0)