mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:54:42 +00:00
Update pre-commit dependencies (#16465)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astral-sh/ruff-pre-commit](https://redirect.github.com/astral-sh/ruff-pre-commit) | repository | patch | `v0.9.6` -> `v0.9.9` | | [crate-ci/typos](https://redirect.github.com/crate-ci/typos) | repository | minor | `v1.29.7` -> `v1.30.0` | | [python-jsonschema/check-jsonschema](https://redirect.github.com/python-jsonschema/check-jsonschema) | repository | patch | `0.31.1` -> `0.31.2` | | [rbubley/mirrors-prettier](https://redirect.github.com/rbubley/mirrors-prettier) | repository | patch | `v3.5.1` -> `v3.5.2` | | [woodruffw/zizmor-pre-commit](https://redirect.github.com/woodruffw/zizmor-pre-commit) | repository | minor | `v1.3.1` -> `v1.4.1` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://redirect.github.com/renovatebot/renovate/discussions/new) if you have any questions. --- ### Release Notes <details> <summary>astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)</summary> ### [`v0.9.9`](https://redirect.github.com/astral-sh/ruff-pre-commit/releases/tag/v0.9.9) [Compare Source](https://redirect.github.com/astral-sh/ruff-pre-commit/compare/v0.9.8...v0.9.9) See: https://github.com/astral-sh/ruff/releases/tag/0.9.9 ### [`v0.9.8`](https://redirect.github.com/astral-sh/ruff-pre-commit/releases/tag/v0.9.8) [Compare Source](https://redirect.github.com/astral-sh/ruff-pre-commit/compare/v0.9.7...v0.9.8) See: https://github.com/astral-sh/ruff/releases/tag/0.9.8 ### [`v0.9.7`](https://redirect.github.com/astral-sh/ruff-pre-commit/releases/tag/v0.9.7) [Compare Source](https://redirect.github.com/astral-sh/ruff-pre-commit/compare/v0.9.6...v0.9.7) See: https://github.com/astral-sh/ruff/releases/tag/0.9.7 </details> <details> <summary>crate-ci/typos (crate-ci/typos)</summary> ### [`v1.30.0`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.30.0) [Compare Source](https://redirect.github.com/crate-ci/typos/compare/v1.29.10...v1.30.0) #### \[1.30.0] - 2025-03-01 ##### Features - Updated the dictionary with the [February 2025](https://redirect.github.com/crate-ci/typos/issues/1221) changes ### [`v1.29.10`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.29.10) [Compare Source](https://redirect.github.com/crate-ci/typos/compare/v1.29.9...v1.29.10) #### \[1.29.10] - 2025-02-25 ##### Fixes - Also correct `contaminent` as `contaminant` ### [`v1.29.9`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.29.9) [Compare Source](https://redirect.github.com/crate-ci/typos/compare/v1.29.8...v1.29.9) #### \[1.29.9] - 2025-02-20 ##### Fixes - *(action)* Correctly get binary for some aarch64 systems ### [`v1.29.8`](https://redirect.github.com/crate-ci/typos/releases/tag/v1.29.8) [Compare Source](https://redirect.github.com/crate-ci/typos/compare/v1.29.7...v1.29.8) #### \[1.29.8] - 2025-02-19 ##### Features - Attempt to build Linux aarch64 binaries </details> <details> <summary>python-jsonschema/check-jsonschema (python-jsonschema/check-jsonschema)</summary> ### [`v0.31.2`](https://redirect.github.com/python-jsonschema/check-jsonschema/blob/HEAD/CHANGELOG.rst#0312) [Compare Source](https://redirect.github.com/python-jsonschema/check-jsonschema/compare/0.31.1...0.31.2) - Update vendored schemas: dependabot, github-workflows, gitlab-ci, mergify, renovate, woodpecker-ci (2025-02-19) </details> <details> <summary>rbubley/mirrors-prettier (rbubley/mirrors-prettier)</summary> ### [`v3.5.2`](https://redirect.github.com/rbubley/mirrors-prettier/compare/v3.5.1...v3.5.2) [Compare Source](https://redirect.github.com/rbubley/mirrors-prettier/compare/v3.5.1...v3.5.2) </details> <details> <summary>woodruffw/zizmor-pre-commit (woodruffw/zizmor-pre-commit)</summary> ### [`v1.4.1`](https://redirect.github.com/woodruffw/zizmor-pre-commit/releases/tag/v1.4.1) [Compare Source](https://redirect.github.com/woodruffw/zizmor-pre-commit/compare/v1.4.0...v1.4.1) See: https://github.com/woodruffw/zizmor/releases/tag/v1.4.1 ### [`v1.4.0`](https://redirect.github.com/woodruffw/zizmor-pre-commit/releases/tag/v1.4.0) [Compare Source](https://redirect.github.com/woodruffw/zizmor-pre-commit/compare/v1.3.1...v1.4.0) See: https://github.com/woodruffw/zizmor/releases/tag/v1.4.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
This commit is contained in:
parent
eaff95e1ad
commit
79a2c7eaa2
6 changed files with 24 additions and 20 deletions
|
@ -60,7 +60,7 @@ repos:
|
||||||
- black==25.1.0
|
- black==25.1.0
|
||||||
|
|
||||||
- repo: https://github.com/crate-ci/typos
|
- repo: https://github.com/crate-ci/typos
|
||||||
rev: v1.29.7
|
rev: v1.30.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: typos
|
- id: typos
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ repos:
|
||||||
pass_filenames: false # This makes it a lot faster
|
pass_filenames: false # This makes it a lot faster
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.9.6
|
rev: v0.9.9
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff-format
|
- id: ruff-format
|
||||||
- id: ruff
|
- id: ruff
|
||||||
|
@ -84,7 +84,7 @@ repos:
|
||||||
|
|
||||||
# Prettier
|
# Prettier
|
||||||
- repo: https://github.com/rbubley/mirrors-prettier
|
- repo: https://github.com/rbubley/mirrors-prettier
|
||||||
rev: v3.5.1
|
rev: v3.5.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
types: [yaml]
|
types: [yaml]
|
||||||
|
@ -92,12 +92,12 @@ repos:
|
||||||
# zizmor detects security vulnerabilities in GitHub Actions workflows.
|
# zizmor detects security vulnerabilities in GitHub Actions workflows.
|
||||||
# Additional configuration for the tool is found in `.github/zizmor.yml`
|
# Additional configuration for the tool is found in `.github/zizmor.yml`
|
||||||
- repo: https://github.com/woodruffw/zizmor-pre-commit
|
- repo: https://github.com/woodruffw/zizmor-pre-commit
|
||||||
rev: v1.3.1
|
rev: v1.4.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: zizmor
|
- id: zizmor
|
||||||
|
|
||||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||||
rev: 0.31.1
|
rev: 0.31.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-github-workflows
|
- id: check-github-workflows
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,10 @@ extend-ignore-re = [
|
||||||
# Line ignore with trailing "spellchecker:disable-line"
|
# Line ignore with trailing "spellchecker:disable-line"
|
||||||
"(?Rm)^.*#\\s*spellchecker:disable-line$",
|
"(?Rm)^.*#\\s*spellchecker:disable-line$",
|
||||||
"LICENSEs",
|
"LICENSEs",
|
||||||
|
# Various third party dependencies uses `typ` as struct field names (e.g., lsp_types::LogMessageParams)
|
||||||
|
"typ",
|
||||||
|
# TODO: Remove this once the `TYP` redirects are removed from `rule_redirects.rs`
|
||||||
|
"TYP",
|
||||||
]
|
]
|
||||||
|
|
||||||
[default.extend-identifiers]
|
[default.extend-identifiers]
|
||||||
|
|
|
@ -1251,25 +1251,25 @@ fn fold_body(body: Vec<DisplayLine<'_>>) -> Vec<DisplayLine<'_>> {
|
||||||
const INNER_UNFOLD_SIZE: usize = INNER_CONTEXT * 2 + 1;
|
const INNER_UNFOLD_SIZE: usize = INNER_CONTEXT * 2 + 1;
|
||||||
|
|
||||||
let mut lines = vec![];
|
let mut lines = vec![];
|
||||||
let mut unhighlighed_lines = vec![];
|
let mut unhighlighted_lines = vec![];
|
||||||
for line in body {
|
for line in body {
|
||||||
match &line {
|
match &line {
|
||||||
DisplayLine::Source { annotations, .. } => {
|
DisplayLine::Source { annotations, .. } => {
|
||||||
if annotations.is_empty() {
|
if annotations.is_empty() {
|
||||||
unhighlighed_lines.push(line);
|
unhighlighted_lines.push(line);
|
||||||
} else {
|
} else {
|
||||||
if lines.is_empty() {
|
if lines.is_empty() {
|
||||||
// Ignore leading unhighlighed lines
|
// Ignore leading unhighlighted lines
|
||||||
unhighlighed_lines.clear();
|
unhighlighted_lines.clear();
|
||||||
}
|
}
|
||||||
match unhighlighed_lines.len() {
|
match unhighlighted_lines.len() {
|
||||||
0 => {}
|
0 => {}
|
||||||
n if n <= INNER_UNFOLD_SIZE => {
|
n if n <= INNER_UNFOLD_SIZE => {
|
||||||
// Rather than render our cut indicator, don't fold
|
// Rather than render our cut indicator, don't fold
|
||||||
lines.append(&mut unhighlighed_lines);
|
lines.append(&mut unhighlighted_lines);
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
lines.extend(unhighlighed_lines.drain(..INNER_CONTEXT));
|
lines.extend(unhighlighted_lines.drain(..INNER_CONTEXT));
|
||||||
let inline_marks = lines
|
let inline_marks = lines
|
||||||
.last()
|
.last()
|
||||||
.and_then(|line| {
|
.and_then(|line| {
|
||||||
|
@ -1287,16 +1287,16 @@ fn fold_body(body: Vec<DisplayLine<'_>>) -> Vec<DisplayLine<'_>> {
|
||||||
lines.push(DisplayLine::Fold {
|
lines.push(DisplayLine::Fold {
|
||||||
inline_marks: inline_marks.clone(),
|
inline_marks: inline_marks.clone(),
|
||||||
});
|
});
|
||||||
unhighlighed_lines
|
unhighlighted_lines
|
||||||
.drain(..unhighlighed_lines.len().saturating_sub(INNER_CONTEXT));
|
.drain(..unhighlighted_lines.len().saturating_sub(INNER_CONTEXT));
|
||||||
lines.append(&mut unhighlighed_lines);
|
lines.append(&mut unhighlighted_lines);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lines.push(line);
|
lines.push(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
unhighlighed_lines.push(line);
|
unhighlighted_lines.push(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,8 @@ pub(crate) fn jinja2_autoescape_false(checker: &Checker, call: &ast::ExprCall) {
|
||||||
if checker
|
if checker
|
||||||
.semantic()
|
.semantic()
|
||||||
.resolve_qualified_name(&call.func)
|
.resolve_qualified_name(&call.func)
|
||||||
.is_some_and(|qualifieed_name| {
|
.is_some_and(|qualified_name| {
|
||||||
matches!(qualifieed_name.segments(), ["jinja2", "Environment"])
|
matches!(qualified_name.segments(), ["jinja2", "Environment"])
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
if let Some(keyword) = call.arguments.find_keyword("autoescape") {
|
if let Some(keyword) = call.arguments.find_keyword("autoescape") {
|
||||||
|
|
|
@ -299,7 +299,7 @@ pub(crate) fn todos(
|
||||||
has_issue_link = true;
|
has_issue_link = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the next_comment isn't a tag or an issue, it's worthles in the context of this
|
// If the next_comment isn't a tag or an issue, it's worthless in the context of this
|
||||||
// linter. We can increment here instead of waiting for the next iteration of the outer
|
// linter. We can increment here instead of waiting for the next iteration of the outer
|
||||||
// loop.
|
// loop.
|
||||||
curr_range = next_range;
|
curr_range = next_range;
|
||||||
|
|
|
@ -239,7 +239,7 @@ fn strip_z_date(call: &ExprCall) -> Option<(&Expr, &Expr)> {
|
||||||
Some((value, func))
|
Some((value, func))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `Some` if this is a subscribt with the form `date[:-1] + "-00"`.
|
/// Returns `Some` if this is a subscript with the form `date[:-1] + "-00"`.
|
||||||
fn slice_minus_1_date(subscript: &ExprSubscript) -> Option<&Expr> {
|
fn slice_minus_1_date(subscript: &ExprSubscript) -> Option<&Expr> {
|
||||||
let ExprSubscript { value, slice, .. } = subscript;
|
let ExprSubscript { value, slice, .. } = subscript;
|
||||||
let slice = slice.as_slice_expr()?;
|
let slice = slice.as_slice_expr()?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue