Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm authored Sep 27, 2024
1 parent 36a2fa4 commit 47a4b3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/red_knot_python_semantic/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ impl<'db> Type<'db> {
Type::IntLiteral(_) | Type::BooleanLiteral(_) => self.repr(db),
Type::StringLiteral(_) | Type::LiteralString => *self,
// TODO: handle more complex types
_ => builtins_symbol_ty(db, "str").to_instance(db),
_ => Type::builtin_str(db).to_instance(db),
}
}

Expand All @@ -760,7 +760,7 @@ impl<'db> Type<'db> {
})),
Type::LiteralString => Type::LiteralString,
// TODO: handle more complex types
_ => builtins_symbol_ty(db, "str").to_instance(db),
_ => Type::builtin_str(db).to_instance(db),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/red_knot_python_semantic/src/types/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl fmt::Debug for DisplayType<'_> {
/// Writes the string representation of a type, which is the value displayed either as
/// `Literal[<repr>]` or `Literal[<repr1>, <repr2>]` for literal types or as `<repr>` for
/// non literals
pub(super) struct DisplayRepresentation<'db> {
struct DisplayRepresentation<'db> {
ty: Type<'db>,
db: &'db dyn Db,
}
Expand Down

0 comments on commit 47a4b3d

Please sign in to comment.