mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-07 13:15:06 +00:00
Update pre-commit dependencies (#10698)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Zanie Blue <contact@zanie.dev> Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
parent
3194f90db1
commit
388658efdb
18 changed files with 28 additions and 8 deletions
|
@ -17,4 +17,4 @@ MD013: false
|
|||
# MD024/no-duplicate-heading
|
||||
MD024:
|
||||
# Allow when nested under different parents e.g. CHANGELOG.md
|
||||
allow_different_nesting: true
|
||||
siblings_only: true
|
||||
|
|
|
@ -13,7 +13,7 @@ exclude: |
|
|||
|
||||
repos:
|
||||
- repo: https://github.com/abravalheri/validate-pyproject
|
||||
rev: v0.15
|
||||
rev: v0.16
|
||||
hooks:
|
||||
- id: validate-pyproject
|
||||
|
||||
|
@ -31,7 +31,7 @@ repos:
|
|||
)$
|
||||
|
||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||
rev: v0.37.0
|
||||
rev: v0.39.0
|
||||
hooks:
|
||||
- id: markdownlint-fix
|
||||
exclude: |
|
||||
|
@ -41,7 +41,7 @@ repos:
|
|||
)$
|
||||
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.16.22
|
||||
rev: v1.19.0
|
||||
hooks:
|
||||
- id: typos
|
||||
|
||||
|
@ -55,7 +55,7 @@ repos:
|
|||
pass_filenames: false # This makes it a lot faster
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.1.4
|
||||
rev: v0.3.4
|
||||
hooks:
|
||||
- id: ruff-format
|
||||
- id: ruff
|
||||
|
@ -70,7 +70,7 @@ repos:
|
|||
|
||||
# Prettier
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v3.0.3
|
||||
rev: v3.1.0
|
||||
hooks:
|
||||
- id: prettier
|
||||
types: [yaml]
|
||||
|
|
|
@ -50,6 +50,7 @@ file_resolver.exclude = [
|
|||
"venv",
|
||||
]
|
||||
file_resolver.extend_exclude = [
|
||||
"crates/ruff/resources/",
|
||||
"crates/ruff_linter/resources/",
|
||||
"crates/ruff_python_formatter/resources/",
|
||||
]
|
||||
|
|
|
@ -158,7 +158,7 @@ fn trace_preorder_visitation(source: &str) -> String {
|
|||
}
|
||||
|
||||
/// Emits a `tree` with a node for every visited AST node (labelled by the AST node's kind)
|
||||
/// and leafs for attributes.
|
||||
/// and leaves for attributes.
|
||||
#[derive(Default)]
|
||||
struct RecordVisitor {
|
||||
depth: usize,
|
||||
|
|
|
@ -181,7 +181,7 @@ where
|
|||
}
|
||||
|
||||
/// Emits a `tree` with a node for every visited AST node (labelled by the AST node's kind)
|
||||
/// and leafs for attributes.
|
||||
/// and leaves for attributes.
|
||||
#[derive(Default)]
|
||||
struct RecordVisitor {
|
||||
depth: usize,
|
||||
|
|
|
@ -58,10 +58,17 @@ include = [
|
|||
|
||||
[tool.ruff]
|
||||
extend-exclude = [
|
||||
"crates/ruff/resources/",
|
||||
"crates/ruff_linter/resources/",
|
||||
"crates/ruff_python_formatter/resources/"
|
||||
]
|
||||
|
||||
[tool.ruff.lint]
|
||||
ignore = [
|
||||
# Conflicts with the formatter
|
||||
"COM812", "ISC001"
|
||||
]
|
||||
|
||||
[tool.black]
|
||||
force-exclude = '''
|
||||
/(
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
Execution, comparison, and summary of `ruff check` ecosystem checks.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
Default projects for ecosystem checks
|
||||
"""
|
||||
|
||||
from ruff_ecosystem.projects import (
|
||||
CheckOptions,
|
||||
FormatOptions,
|
||||
|
|
|
@ -8,6 +8,7 @@ Example usage:
|
|||
--url https://pypi.org/project/flake8-pie/ \
|
||||
--prefix PIE
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -9,6 +9,7 @@ Example usage:
|
|||
--code 807 \
|
||||
--linter flake8-pie
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Check code snippets in docs are formatted by black."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -9,6 +9,7 @@ Example usage:
|
|||
|
||||
scripts/check_ecosystem.py <path/to/ruff1> <path/to/ruff2>
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -3,6 +3,7 @@ panics, fix errors and similar problems.
|
|||
|
||||
It's a less elaborate, more hacky version of check_ecosystem.py
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
|
|
@ -5,6 +5,7 @@ Source:
|
|||
|
||||
Only the generation of the file has been modified for use in this project.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Generate an MkDocs-compatible `docs` and `mkdocs.yml` from the README.md."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -4,6 +4,7 @@ By default, we assume that our README.md will be rendered on GitHub. However, di
|
|||
targets have different strategies for rendering light- and dark-mode images. This script
|
||||
adjusts the images in the README.md to support the given target.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"""Generate the confusables.rs file from the VS Code ambiguous.json file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
|
|
@ -4,6 +4,7 @@ This script will clone astral-sh/schemastore, update the schema and push the cha
|
|||
to a new branch tagged with the ruff git hash. You should see a URL to create the PR
|
||||
to schemastore in the CLI.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue