diff --git a/CHANGELOG.md b/CHANGELOG.md index a3e1f0c399..e9306deb01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1421,11 +1421,11 @@ The following rules have been stabilized and are no longer in preview: The following behaviors have been stabilized: -- [`cancel-scope-no-checkpoint`](https://docs.astral.sh/ruff/rules/cancel-scope-no-checkpoint/) (`ASYNC100`): Support `asyncio` and `anyio` context mangers. -- [`async-function-with-timeout`](https://docs.astral.sh/ruff/rules/async-function-with-timeout/) (`ASYNC109`): Support `asyncio` and `anyio` context mangers. -- [`async-busy-wait`](https://docs.astral.sh/ruff/rules/async-busy-wait/) (`ASYNC110`): Support `asyncio` and `anyio` context mangers. -- [`async-zero-sleep`](https://docs.astral.sh/ruff/rules/async-zero-sleep/) (`ASYNC115`): Support `anyio` context mangers. -- [`long-sleep-not-forever`](https://docs.astral.sh/ruff/rules/long-sleep-not-forever/) (`ASYNC116`): Support `anyio` context mangers. +- [`cancel-scope-no-checkpoint`](https://docs.astral.sh/ruff/rules/cancel-scope-no-checkpoint/) (`ASYNC100`): Support `asyncio` and `anyio` context managers. +- [`async-function-with-timeout`](https://docs.astral.sh/ruff/rules/async-function-with-timeout/) (`ASYNC109`): Support `asyncio` and `anyio` context managers. +- [`async-busy-wait`](https://docs.astral.sh/ruff/rules/async-busy-wait/) (`ASYNC110`): Support `asyncio` and `anyio` context managers. +- [`async-zero-sleep`](https://docs.astral.sh/ruff/rules/async-zero-sleep/) (`ASYNC115`): Support `anyio` context managers. +- [`long-sleep-not-forever`](https://docs.astral.sh/ruff/rules/long-sleep-not-forever/) (`ASYNC116`): Support `anyio` context managers. The following fixes have been stabilized: diff --git a/crates/red_knot_python_semantic/resources/mdtest/exception/except_star.md b/crates/red_knot_python_semantic/resources/mdtest/exception/except_star.md index b64f6f4e64..da1a3de3f0 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/exception/except_star.md +++ b/crates/red_knot_python_semantic/resources/mdtest/exception/except_star.md @@ -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 ``` diff --git a/crates/red_knot_python_semantic/resources/mdtest/expression/lambda.md b/crates/red_knot_python_semantic/resources/mdtest/expression/lambda.md index 35653bab39..9db77532cb 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/expression/lambda.md +++ b/crates/red_knot_python_semantic/resources/mdtest/expression/lambda.md @@ -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) diff --git a/crates/red_knot_python_semantic/src/ast_node_ref.rs b/crates/red_knot_python_semantic/src/ast_node_ref.rs index 2ecdb6b752..692191b5b7 100644 --- a/crates/red_knot_python_semantic/src/ast_node_ref.rs +++ b/crates/red_knot_python_semantic/src/ast_node_ref.rs @@ -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` diff --git a/crates/red_knot_python_semantic/src/types.rs b/crates/red_knot_python_semantic/src/types.rs index 61d6b147e3..b50eb00054 100644 --- a/crates/red_knot_python_semantic/src/types.rs +++ b/crates/red_knot_python_semantic/src/types.rs @@ -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()`: + // All heterogeneous tuple types are subtypes of `Instance()`: // `Instance()` expresses "the set of all possible instances of the class `T`"; // consequently, `Instance()` 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 } } diff --git a/crates/red_knot_python_semantic/src/types/infer.rs b/crates/red_knot_python_semantic/src/types/infer.rs index 460ce531c8..0d7f4c190b 100644 --- a/crates/red_knot_python_semantic/src/types/infer.rs +++ b/crates/red_knot_python_semantic/src/types/infer.rs @@ -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 diff --git a/crates/red_knot_python_semantic/src/types/property_tests.rs b/crates/red_knot_python_semantic/src/types/property_tests.rs index 55273f4e9f..6324b72102 100644 --- a/crates/red_knot_python_semantic/src/types/property_tests.rs +++ b/crates/red_knot_python_semantic/src/types/property_tests.rs @@ -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. diff --git a/crates/ruff_annotate_snippets/src/renderer/display_list.rs b/crates/ruff_annotate_snippets/src/renderer/display_list.rs index 022e1943c3..4581834fd3 100644 --- a/crates/ruff_annotate_snippets/src/renderer/display_list.rs +++ b/crates/ruff_annotate_snippets/src/renderer/display_list.rs @@ -937,7 +937,7 @@ impl From 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)] diff --git a/crates/ruff_linter/resources/test/fixtures/airflow/AIR302_args.py b/crates/ruff_linter/resources/test/fixtures/airflow/AIR302_args.py index 28055baf83..56ce0fd16c 100644 --- a/crates/ruff_linter/resources/test/fixtures/airflow/AIR302_args.py +++ b/crates/ruff_linter/resources/test/fixtures/airflow/AIR302_args.py @@ -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") diff --git a/crates/ruff_linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR302_AIR302_args.py.snap b/crates/ruff_linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR302_AIR302_args.py.snap index d1bc4c6c15..f114918eac 100644 --- a/crates/ruff_linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR302_AIR302_args.py.snap +++ b/crates/ruff_linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR302_AIR302_args.py.snap @@ -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 diff --git a/playground/knot/src/Editor/Chrome.tsx b/playground/knot/src/Editor/Chrome.tsx index acf6ff65b3..76a00cf70e 100644 --- a/playground/knot/src/Editor/Chrome.tsx +++ b/playground/knot/src/Editor/Chrome.tsx @@ -446,7 +446,7 @@ interface FilesState { contents: Readonly<{ [id: FileId]: string }>; /** - * The revision. Gets incremented everytime files changes. + * The revision. Gets incremented every time files changes. */ revision: number; nextId: FileId;