From a1c3f163581e70c0f7d0f82b202ff7cd54308e8c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Dec 2025 17:11:28 +0000 Subject: [PATCH] Update pre-commit dependencies (#22281) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Micha Reiser --- .github/actionlint.yaml | 5 +++++ .pre-commit-config.yaml | 20 +++++++++---------- crates/ruff_linter/src/message/sarif.rs | 2 +- .../ruff_linter/src/rules/airflow/helpers.rs | 2 +- .../mccabe/rules/function_is_too_complex.rs | 2 +- crates/ty_ide/src/inlay_hints.rs | 2 +- crates/ty_module_resolver/src/resolve.rs | 2 +- .../resources/mdtest/exception/basic.md | 10 ++++++---- .../src/semantic_index/builder.rs | 4 ++-- crates/ty_python_semantic/src/types/class.rs | 2 +- .../src/types/ide_support.rs | 2 +- .../src/types/property_tests.rs | 2 +- scripts/ty_benchmark/README.md | 2 +- 13 files changed, 32 insertions(+), 25 deletions(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index 5e0664dfc7..13f2d069d8 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -13,3 +13,8 @@ self-hosted-runner: - github-windows-2025-x86_64-8 - github-windows-2025-x86_64-16 - codspeed-macro + +paths: + ".github/workflows/mypy_primer.yaml": + ignore: + - 'condition "false" is always evaluated to false. remove the if: section' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5913919d67..7e708d03c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ exclude: | repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-merge-conflict @@ -46,7 +46,7 @@ repos: )$ - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.45.0 + rev: v0.47.0 hooks: - id: markdownlint-fix exclude: | @@ -56,7 +56,7 @@ repos: )$ - repo: https://github.com/adamchainz/blacken-docs - rev: 1.19.1 + rev: 1.20.0 hooks: - id: blacken-docs language: python # means renovate will also update `additional_dependencies` @@ -67,10 +67,10 @@ repos: .*?invalid(_.+)*_syntax\.md )$ additional_dependencies: - - black==25.1.0 + - black==25.12.0 - repo: https://github.com/crate-ci/typos - rev: v1.34.0 + rev: v1.40.0 hooks: - id: typos @@ -84,7 +84,7 @@ repos: pass_filenames: false # This makes it a lot faster - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.7 + rev: v0.14.10 hooks: - id: ruff-format - id: ruff-check @@ -94,7 +94,7 @@ repos: # Prettier - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.6.2 + rev: v3.7.4 hooks: - id: prettier types: [yaml] @@ -102,19 +102,19 @@ repos: # zizmor detects security vulnerabilities in GitHub Actions workflows. # Additional configuration for the tool is found in `.github/zizmor.yml` - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.16.0 + rev: v1.19.0 hooks: - id: zizmor - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.33.2 + rev: 0.36.0 hooks: - id: check-github-workflows # `actionlint` hook, for verifying correct syntax in GitHub Actions workflows. # Some additional configuration for `actionlint` can be found in `.github/actionlint.yaml`. - repo: https://github.com/rhysd/actionlint - rev: v1.7.7 + rev: v1.7.9 hooks: - id: actionlint stages: diff --git a/crates/ruff_linter/src/message/sarif.rs b/crates/ruff_linter/src/message/sarif.rs index 764d7a737e..f67fb6e2ff 100644 --- a/crates/ruff_linter/src/message/sarif.rs +++ b/crates/ruff_linter/src/message/sarif.rs @@ -18,7 +18,7 @@ use crate::registry::{Linter, RuleNamespace}; /// An emitter for producing SARIF 2.1.0-compliant JSON output. /// /// Static Analysis Results Interchange Format (SARIF) is a standard format -/// for static analysis results. For full specfification, see: +/// for static analysis results. For full specification, see: /// [SARIF 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html) pub struct SarifEmitter; diff --git a/crates/ruff_linter/src/rules/airflow/helpers.rs b/crates/ruff_linter/src/rules/airflow/helpers.rs index 4b2c25f93f..663e80e9c5 100644 --- a/crates/ruff_linter/src/rules/airflow/helpers.rs +++ b/crates/ruff_linter/src/rules/airflow/helpers.rs @@ -188,7 +188,7 @@ pub(crate) fn match_head(value: &Expr) -> Option<&ExprName> { /// Return the [`Fix`] that imports the new name and updates where the import is referenced. /// This is used for cases that member name has changed. -/// (e.g., `airflow.datasts.Dataset` to `airflow.sdk.Asset`) +/// (e.g., `airflow.datasets.Dataset` to `airflow.sdk.Asset`) pub(crate) fn generate_import_edit( expr: &Expr, checker: &Checker, diff --git a/crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs b/crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs index bc1ca1e278..7f2ef8b2ad 100644 --- a/crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs +++ b/crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs @@ -503,7 +503,7 @@ def f(): } #[test] - fn match_case_catch_all_with_seuqnece() -> Result<()> { + fn match_case_catch_all_with_sequence() -> Result<()> { let source = r" def f(): match subject: diff --git a/crates/ty_ide/src/inlay_hints.rs b/crates/ty_ide/src/inlay_hints.rs index 86756f175a..09d522e497 100644 --- a/crates/ty_ide/src/inlay_hints.rs +++ b/crates/ty_ide/src/inlay_hints.rs @@ -5251,7 +5251,7 @@ mod tests { } #[test] - fn test_nexted_keyword_function_calls() { + fn test_nested_keyword_function_calls() { let mut test = inlay_hint_test( " def foo(x: str) -> str: diff --git a/crates/ty_module_resolver/src/resolve.rs b/crates/ty_module_resolver/src/resolve.rs index 79a91f383d..501f485a48 100644 --- a/crates/ty_module_resolver/src/resolve.rs +++ b/crates/ty_module_resolver/src/resolve.rs @@ -466,7 +466,7 @@ fn absolute_desperate_search_paths(db: &dyn Db, importing_file: File) -> Option< /// Get the search-paths for desperate resolution of relative imports in this file. /// /// Currently this is "the closest ancestor dir that contains a pyproject.toml (or ty.toml)", -/// which is a completely arbitrary decision. However it's farily important that relative +/// which is a completely arbitrary decision. However it's fairly important that relative /// desperate search-paths pick a single "best" answer because every one is *valid* but one /// that's too long or too short may cause problems. /// diff --git a/crates/ty_python_semantic/resources/mdtest/exception/basic.md b/crates/ty_python_semantic/resources/mdtest/exception/basic.md index 0d65b9b849..4730887a3c 100644 --- a/crates/ty_python_semantic/resources/mdtest/exception/basic.md +++ b/crates/ty_python_semantic/resources/mdtest/exception/basic.md @@ -104,10 +104,12 @@ def silence[T: type[BaseException]]( except exception_type as e: reveal_type(e) # revealed: T'instance@silence -def silence2[T: ( - type[ValueError], - type[TypeError], -)](func: Callable[[], None], exception_type: T,): +def silence2[ + T: ( + type[ValueError], + type[TypeError], + ) +](func: Callable[[], None], exception_type: T,): try: func() except exception_type as e: diff --git a/crates/ty_python_semantic/src/semantic_index/builder.rs b/crates/ty_python_semantic/src/semantic_index/builder.rs index 67745d08aa..3ef83e97d2 100644 --- a/crates/ty_python_semantic/src/semantic_index/builder.rs +++ b/crates/ty_python_semantic/src/semantic_index/builder.rs @@ -757,9 +757,9 @@ impl<'db, 'ast> SemanticIndexBuilder<'db, 'ast> { fn record_expression_narrowing_constraint( &mut self, - precide_node: &ast::Expr, + predicate_node: &ast::Expr, ) -> PredicateOrLiteral<'db> { - let predicate = self.build_predicate(precide_node); + let predicate = self.build_predicate(predicate_node); self.record_narrowing_constraint(predicate); predicate } diff --git a/crates/ty_python_semantic/src/types/class.rs b/crates/ty_python_semantic/src/types/class.rs index f17de1253e..691dbf9e75 100644 --- a/crates/ty_python_semantic/src/types/class.rs +++ b/crates/ty_python_semantic/src/types/class.rs @@ -5904,7 +5904,7 @@ impl KnownClass { // Parsing something of the form: // // @deprecated("message") - // @deprecated("message", caregory = DeprecationWarning, stacklevel = 1) + // @deprecated("message", category = DeprecationWarning, stacklevel = 1) // // "Static type checker behavior is not affected by the category and stacklevel arguments" // so we only need the message and can ignore everything else. The message is mandatory, diff --git a/crates/ty_python_semantic/src/types/ide_support.rs b/crates/ty_python_semantic/src/types/ide_support.rs index 1e93e9d842..8139582d58 100644 --- a/crates/ty_python_semantic/src/types/ide_support.rs +++ b/crates/ty_python_semantic/src/types/ide_support.rs @@ -73,7 +73,7 @@ pub fn definitions_for_name<'db>( let is_global = place_expr.is_global(); let is_nonlocal = place_expr.is_nonlocal(); - // TODO: The current algorithm doesn't return definintions or bindings + // TODO: The current algorithm doesn't return definitions or bindings // for other scopes that are outside of this scope hierarchy that target // this name using a nonlocal or global binding. The semantic analyzer // doesn't appear to track these in a way that we can easily access diff --git a/crates/ty_python_semantic/src/types/property_tests.rs b/crates/ty_python_semantic/src/types/property_tests.rs index 2c3988bab4..ba65ad72d3 100644 --- a/crates/ty_python_semantic/src/types/property_tests.rs +++ b/crates/ty_python_semantic/src/types/property_tests.rs @@ -340,7 +340,7 @@ mod flaky { // Similarly, `T'`, the bottom materialization of `T`, should also be assignable to `T`. type_property_test!( - bottom_materialization_of_type_is_assigneble_to_type, db, + bottom_materialization_of_type_is_assignable_to_type, db, forall types t. t.bottom_materialization(db).is_assignable_to(db, t) ); } diff --git a/scripts/ty_benchmark/README.md b/scripts/ty_benchmark/README.md index 599f7609c9..70c79eb984 100644 --- a/scripts/ty_benchmark/README.md +++ b/scripts/ty_benchmark/README.md @@ -67,7 +67,7 @@ some projects only successfully pass type checking using a specific type checker ## Updating the benchmark -The benchmark script supports snapshoting the results when running with `--snapshot` and `--accept`. +The benchmark script supports snapshotting the results when running with `--snapshot` and `--accept`. The goal of those snapshots is to catch accidental regressions. For example, if a project adds new dependencies that we fail to install. They are not intended as a testing tool. E.g. the snapshot runner doesn't account for platform differences so that you might see differences when running the snapshots on your machine.