Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/ruff_benchmark/benches/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ fn benchmark_complex_constrained_attributes_2(criterion: &mut Criterion) {
criterion.bench_function("ty_micro[complex_constrained_attributes_2]", |b| {
b.iter_batched_ref(
|| {
// This is is similar to the case above, but now the attributes are actually defined.
// This is similar to the case above, but now the attributes are actually defined.
// https://github.com/astral-sh/ty/issues/711
setup_micro_case(
r#"
Expand Down
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/checkers/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ impl<'a> Checker<'a> {
}
}

/// Visit an body of [`Stmt`] nodes within a type-checking block.
/// Visit a body of [`Stmt`] nodes within a type-checking block.
fn visit_type_checking_block(&mut self, body: &'a [Stmt]) {
let snapshot = self.semantic.flags;
self.semantic.flags |= SemanticModelFlags::TYPE_CHECKING_BLOCK;
Expand Down
2 changes: 1 addition & 1 deletion crates/ruff_python_semantic/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@ impl<'a> SemanticModel<'a> {
/// Finds and returns the [`Scope`] corresponding to a given [`ast::StmtFunctionDef`].
///
/// This method searches all scopes created by a function definition, comparing the
/// [`TextRange`] of the provided `function_def` with the the range of the function
/// [`TextRange`] of the provided `function_def` with the range of the function
/// associated with the scope.
pub fn function_scope(&self, function_def: &ast::StmtFunctionDef) -> Option<&Scope<'_>> {
self.scopes.iter().find(|scope| {
Expand Down
2 changes: 1 addition & 1 deletion crates/ty_ide/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ fn import_from_tokens(tokens: &[Token]) -> Option<&Token> {
/// This also handles cases like `import foo, c<CURSOR>, bar`.
///
/// If found, a token corresponding to the `import` or `from` keyword
/// and the the closest point of the `<CURSOR>` is returned.
/// and the closest point of the `<CURSOR>` is returned.
///
/// It is assumed that callers will call `from_import_tokens` first to
/// try and recognize a `from ... import ...` statement before using
Expand Down
2 changes: 1 addition & 1 deletion crates/ty_ide/src/importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl<'a> Importer<'a> {
/// then the existing style is always respected instead.
///
/// `members` should be a map of symbols in scope at the position
/// where the the imported symbol should be available. This is used
/// where the imported symbol should be available. This is used
/// to craft import statements in a way that doesn't conflict with
/// symbols in scope. If it's not feasible to provide this map, then
/// providing an empty map is generally fine. But it does mean that
Expand Down
2 changes: 1 addition & 1 deletion crates/ty_project/src/glob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mod exclude;
mod include;
mod portable;

/// Path filtering based on an an exclude and include glob pattern set.
/// Path filtering based on an exclude and include glob pattern set.
///
/// Exclude patterns take precedence over includes.
#[derive(Clone, Debug, Eq, PartialEq, get_size2::GetSize)]
Expand Down
2 changes: 1 addition & 1 deletion crates/ty_python_semantic/src/semantic_index/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,7 @@ impl<'ast> Visitor<'ast> for SemanticIndexBuilder<'_, 'ast> {
// like `sys.exit()`, and not within sub-expression like `3 + sys.exit()` etc.
//
// We also only add these inside function scopes, since considering module-level
// constraints can affect the the type of imported symbols, leading to a lot more
// constraints can affect the type of imported symbols, leading to a lot more
// work in third-party code.
if let ast::Expr::Call(ast::ExprCall { func, .. }) = value.as_ref() {
if !self.source_type.is_stub() && self.in_function_scope() {
Expand Down
2 changes: 1 addition & 1 deletion crates/ty_python_semantic/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3145,7 +3145,7 @@ impl<'db> Type<'db> {
);
match self {
Type::Callable(callable) if callable.is_function_like(db) => {
// For "function-like" callables, model the the behavior of `FunctionType.__get__`.
// For "function-like" callables, model the behavior of `FunctionType.__get__`.
//
// It is a shortcut to model this in `try_call_dunder_get`. If we want to be really precise,
// we should instead return a new method-wrapper type variant for the synthesized `__get__`
Expand Down
Loading