Skip to content

Commit

Permalink
Update ruff.
Browse files Browse the repository at this point in the history
  • Loading branch information
jab committed Mar 3, 2024
1 parent 0cb7d99 commit d678090
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
- pytest

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.3.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// vim: set ft=json5
{
"editor.formatOnSaveMode": "modificationsIfAvailable",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
Expand Down
1 change: 0 additions & 1 deletion bidict/_bidict.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def clear(self) -> None:
def pop(self, key: KT, /) -> VT: ...
@t.overload
def pop(self, key: KT, default: DT = ..., /) -> VT | DT: ...

def pop(self, key: KT, default: ODT[DT] = MISSING, /) -> VT | DT:
"""*x.pop(k[, d]) → v*
Expand Down
1 change: 0 additions & 1 deletion bidict/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class Maplike(t.Protocol[KT, VT_co]):
"""Like typeshed's SupportsKeysAndGetItem, but usable at runtime."""

def keys(self) -> t.Iterable[KT]: ...

def __getitem__(self, __key: KT) -> VT_co: ...


Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ preview = true
line-length = 121

[tool.ruff.lint]
# https://beta.ruff.rs/docs/rules/
# https://docs.astral.sh/ruff/rules/
extend-select = [
"A",
"ARG",
Expand Down Expand Up @@ -82,6 +82,9 @@ extend-select = [
"W",
"YTT",
]
ignore = [
"E301", # https://github.com/astral-sh/ruff/issues/10211 (blank lines covered by `ruff format` anyway)
]

[tool.ruff.lint.isort]
force-single-line = true
Expand Down

0 comments on commit d678090

Please sign in to comment.