Fixing various spelling errors (#16924)

<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

This is a cleanup PR. I am fixing various English language spelling
errors. This is mostly in docs and docstrings.

## Test Plan

The usual CI tests were run. I tried to build the docs (though I had
some troubles there). The testing needs here are, I trust, very low
impact. (Though I would happily test more.)
This commit is contained in:
John Stilley 2025-03-23 01:08:40 -07:00 committed by GitHub
parent 7fb765d9b6
commit c35f2bfe32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 20 additions and 20 deletions

View file

@ -24,7 +24,7 @@ try:
help()
except* OSError as e:
# TODO: more precise would be `ExceptionGroup[OSError]` --Alex
# (needs homogenous tuples + generics)
# (needs homogeneous tuples + generics)
reveal_type(e) # revealed: BaseExceptionGroup
```
@ -35,7 +35,7 @@ try:
help()
except* (TypeError, AttributeError) as e:
# TODO: more precise would be `ExceptionGroup[TypeError | AttributeError]` --Alex
# (needs homogenous tuples + generics)
# (needs homogeneous tuples + generics)
reveal_type(e) # revealed: BaseExceptionGroup
```

View file

@ -76,7 +76,7 @@ Using a parameter with default value:
lambda x=1: reveal_type(x) # revealed: Unknown | Literal[1]
```
Using a variadic paramter:
Using a variadic parameter:
```py
# TODO: should be `tuple[Unknown, ...]` (needs generics)

View file

@ -17,7 +17,7 @@ use ruff_db::parsed::ParsedModule;
/// ## Usage in salsa tracked structs
/// It's important that [`AstNodeRef`] fields in salsa tracked structs are tracked fields
/// (attributed with `#[tracked`]). It prevents that the tracked struct gets a new ID
/// everytime the AST changes, which in turn, invalidates the result of any query
/// every time the AST changes, which in turn, invalidates the result of any query
/// that takes said tracked struct as a query argument or returns the tracked struct as part of its result.
///
/// For example, marking the [`AstNodeRef`] as tracked on `Expression`

View file

@ -667,7 +667,7 @@ impl<'db> Type<'db> {
false
}
// A fully static heterogenous tuple type `A` is a subtype of a fully static heterogeneous tuple type `B`
// A fully static heterogeneous tuple type `A` is a subtype of a fully static heterogeneous tuple type `B`
// iff the two tuple types have the same number of elements and each element-type in `A` is a subtype
// of the element-type at the same index in `B`. (Now say that 5 times fast.)
//
@ -687,7 +687,7 @@ impl<'db> Type<'db> {
// Other than the special tuple-to-tuple case handled, above,
// tuple subtyping delegates to `Instance(tuple)` in the same way as the literal types.
//
// All heterogenous tuple types are subtypes of `Instance(<tuple>)`:
// All heterogeneous tuple types are subtypes of `Instance(<tuple>)`:
// `Instance(<some class T>)` expresses "the set of all possible instances of the class `T`";
// consequently, `Instance(<tuple>)` expresses "the set of all possible instances of the class `tuple`".
// This type can be spelled in type annotations as `tuple[object, ...]` (since `tuple` is covariant).
@ -1134,7 +1134,7 @@ impl<'db> Type<'db> {
}
// for `type[Any]`/`type[Unknown]`/`type[Todo]`, we know the type cannot be any larger than `type`,
// so although the type is dynamic we can still determine disjointness in some situations
// so although the type is dynamic we can still determine disjointedness in some situations
(Type::SubclassOf(subclass_of_ty), other)
| (other, Type::SubclassOf(subclass_of_ty)) => match subclass_of_ty.subclass_of() {
ClassBase::Dynamic(_) => {
@ -1289,7 +1289,7 @@ impl<'db> Type<'db> {
(Type::Callable(CallableType::General(_)), _)
| (_, Type::Callable(CallableType::General(_))) => {
// TODO: Implement disjointness for general callable types
// TODO: Implement disjointedness for general callable types
false
}
}

View file

@ -491,7 +491,7 @@ enum DeclaredAndInferredType<'db> {
/// [`TypeInferenceBuilder`] just for that definition, and we merge the returned [`TypeInference`]
/// into the one we are currently building for the entire scope. Using the query in this way
/// ensures that if we first infer types for some scattered definitions in a scope, and later for
/// the entire scope, we don't re-infer any types, we re-use the cached inference for those
/// the entire scope, we don't re-infer any types, we reuse the cached inference for those
/// definitions and their sub-expressions.
///
/// Functions with a name like `infer_*_definition` take both a node and a [`Definition`], and are

View file

@ -266,7 +266,7 @@ mod flaky {
);
// Equal element sets of unions implies equivalence
// flaky at laest in part because of https://github.com/astral-sh/ruff/issues/15513
// flaky at least in part because of https://github.com/astral-sh/ruff/issues/15513
type_property_test!(
union_equivalence_not_order_dependent, db,
forall types s, t, u.

View file

@ -937,7 +937,7 @@ impl From<snippet::Level> for DisplayAnnotationType {
}
}
/// Information whether the header is the initial one or a consequitive one
/// Information whether the header is the initial one or a consecutive one
/// for multi-slice cases.
// TODO: private
#[derive(Debug, Clone, PartialEq)]

View file

@ -85,7 +85,7 @@ def decorator_deprecated_operator_args():
bdow_op >> bdow_op2
# deprecated filename_template arugment in FileTaskHandler
# deprecated filename_template argument in FileTaskHandler
S3TaskHandler(filename_template="/tmp/test")
HdfsTaskHandler(filename_template="/tmp/test")
ElasticsearchTaskHandler(filename_template="/tmp/test")

View file

@ -228,7 +228,7 @@ AIR302_args.py:67:9: AIR302 `sla` is removed in Airflow 3.0
AIR302_args.py:89:15: AIR302 `filename_template` is removed in Airflow 3.0
|
88 | # deprecated filename_template arugment in FileTaskHandler
88 | # deprecated filename_template argument in FileTaskHandler
89 | S3TaskHandler(filename_template="/tmp/test")
| ^^^^^^^^^^^^^^^^^ AIR302
90 | HdfsTaskHandler(filename_template="/tmp/test")
@ -237,7 +237,7 @@ AIR302_args.py:89:15: AIR302 `filename_template` is removed in Airflow 3.0
AIR302_args.py:90:17: AIR302 `filename_template` is removed in Airflow 3.0
|
88 | # deprecated filename_template arugment in FileTaskHandler
88 | # deprecated filename_template argument in FileTaskHandler
89 | S3TaskHandler(filename_template="/tmp/test")
90 | HdfsTaskHandler(filename_template="/tmp/test")
| ^^^^^^^^^^^^^^^^^ AIR302