Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #2946

Merged
merged 4 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.2.1
hooks:
- id: ruff
types: [file]
Expand Down
25 changes: 13 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,20 @@ ignore-words-list = 'astroid,crasher,asend'
respect-gitignore = true
fix = true

allowed-confusables = ["–"]

# The directories to consider when resolving first vs. third-party imports.
# Does not control what files to include/exclude!
src = ["src/trio", "notes-to-self"]

include = ["*.py", "*.pyi", "**/pyproject.toml"]

extend-exclude = [
"docs/source/reference-*",
"docs/source/tutorial/*",
]

[tool.ruff.lint]
allowed-confusables = ["–"]

select = [
"A", # flake8-builtins
"ASYNC", # flake8-async
Expand Down Expand Up @@ -120,14 +128,7 @@ extend-ignore = [
'SIM117', # multiple-with-statements (messes up lots of context-based stuff and looks bad)
]

include = ["*.py", "*.pyi", "**/pyproject.toml"]

extend-exclude = [
"docs/source/reference-*",
"docs/source/tutorial/*",
]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
# F401 is ignoring unused imports. For these particular files,
# these are public APIs where we are importing everything we want
# to export for public use.
Expand All @@ -138,10 +139,10 @@ extend-exclude = [
'src/trio/socket.py' = ['F401']
'src/trio/testing/__init__.py' = ['F401']

[tool.ruff.isort]
[tool.ruff.lint.isort]
combine-as-imports = true

[tool.ruff.flake8-pytest-style]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false

[tool.mypy]
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pytz==2024.1
# via babel
requests==2.31.0
# via sphinx
ruff==0.2.0
ruff==0.2.1
# via -r test-requirements.in
sniffio==1.3.0
# via -r test-requirements.in
Expand Down
Loading