Skip to content

Commit 0a479cd

Browse files
chore: Format for Ruff 0.15.2
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
1 parent b5ad0f7 commit 0a479cd

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: check-yaml
1818
- id: check-added-large-files
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.15.1
20+
rev: v0.15.2
2121
hooks:
2222
- id: ruff-check
2323
- id: ruff-format

‎backoff/__init__.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
from backoff._wait_gen import constant, decay, expo, fibo, runtime
1818

1919
__all__ = [
20-
"on_predicate",
21-
"on_exception",
2220
"constant",
23-
"expo",
2421
"decay",
22+
"expo",
2523
"fibo",
26-
"runtime",
2724
"full_jitter",
25+
"on_exception",
26+
"on_predicate",
2827
"random_jitter",
28+
"runtime",
2929
]
3030

3131
__version__ = "2.3.1"

‎backoff/_typing.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Details(_Details, total=False):
3333

3434
T = TypeVar("T")
3535

36-
_CallableT = TypeVar("_CallableT", bound=Callable[..., Any])
36+
_CallableT = TypeVar("_CallableT", bound=Callable[..., Any]) # noqa: PYI018
3737
_Handler = Union[
3838
Callable[[Details], None],
3939
Callable[[Details], Coroutine[Any, Any, None]],

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ package = [
180180
extend-include = ["docs/**/*.md"]
181181
line-length = 88
182182
preview = true
183-
required-version = ">=0.15"
183+
required-version = ">=0.15.2"
184184
target-version = "py38"
185185

186186
[tool.ruff.format]

‎tests/test_backoff.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,9 @@ def __init__(self):
498498

499499
@backoff.on_predicate(
500500
backoff.constant,
501-
on_backoff=(l.backoffs.append for l in loggers), # noqa: E741
502-
on_giveup=(l.giveups.append for l in loggers), # noqa: E741
503-
on_success=(l.successes.append for l in loggers), # noqa: E741
501+
on_backoff=(l.backoffs.append for l in loggers),
502+
on_giveup=(l.giveups.append for l in loggers),
503+
on_success=(l.successes.append for l in loggers),
504504
max_tries=3,
505505
jitter=None,
506506
interval=0,
@@ -714,7 +714,7 @@ def return_true(log, n):
714714
assert ret is True
715715
assert len(log) == 3
716716

717-
except Exception as ex:
717+
except Exception as ex: # noqa: BLE001
718718
result.append(ex)
719719
else:
720720
result.append("success")
@@ -776,7 +776,7 @@ def keyerror_then_true(log, n):
776776
assert keyerror_then_true(log, 3) is True
777777
assert len(log) == 3
778778

779-
except Exception as ex:
779+
except Exception as ex: # noqa: BLE001
780780
result.append(ex)
781781
else:
782782
result.append("success")

0 commit comments

Comments
 (0)