Skip to content

Commit

Permalink
Update ruff from v0.1.14 → v0.2.1
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.14 → v0.2.0](astral-sh/ruff-pre-commit@v0.1.14...v0.2.0)

* Update to ruff `0.2.1`

* Move configuration to new areas from depreciated areas

* Not required but update test version to ruff 0.2.1

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: CoolCat467 <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and CoolCat467 authored Feb 11, 2024
1 parent 70c8b76 commit bd19635
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
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

0 comments on commit bd19635

Please sign in to comment.