Skip to content
Open
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.8
rev: v0.16.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/crate-ci/typos
rev: v1.40.0
rev: v1
hooks:
- id: typos
2 changes: 1 addition & 1 deletion packages/hmr/reactivity/_typing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
if TYPE_CHECKING:
from typing_extensions import deprecated # noqa: UP035
else:
deprecated = lambda _: lambda _: _ # noqa: E731
deprecated = lambda _: lambda _: _

Check failure on line 6 in packages/hmr/reactivity/_typing_utils.py

View workflow job for this annotation

GitHub Actions / check

Ruff (E731)

packages/hmr/reactivity/_typing_utils.py:6:5: E731 Do not assign a `lambda` expression, use a `def`

Check failure on line 6 in packages/hmr/reactivity/_typing_utils.py

View workflow job for this annotation

GitHub Actions / check

Ruff (E731)

packages/hmr/reactivity/_typing_utils.py:6:5: E731 Do not assign a `lambda` expression, use a `def`
2 changes: 1 addition & 1 deletion packages/hmr/reactivity/async_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
yield from evt.wait().__await__()
if exc is not None:
raise exc
return res # noqa: F821
return res

Check failure on line 53 in packages/hmr/reactivity/async_primitives.py

View workflow job for this annotation

GitHub Actions / check

Ruff (F821)

packages/hmr/reactivity/async_primitives.py:53:28: F821 Undefined name `res`

Check failure on line 53 in packages/hmr/reactivity/async_primitives.py

View workflow job for this annotation

GitHub Actions / check

Ruff (F821)

packages/hmr/reactivity/async_primitives.py:53:28: F821 Undefined name `res`

return Future()

Expand Down
6 changes: 2 additions & 4 deletions packages/hmr/reactivity/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,8 @@ def __delitem__(self, key):
def insert(self, index, value):
if index < 0:
index += self._length
if index < 0:
index = 0
if index > self._length:
index = self._length
index = max(index, 0)
index = min(index, self._length)
self._replace(slice(index, index), [value])

def append(self, value):
Expand Down
2 changes: 1 addition & 1 deletion tests/py/utils/trio.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
yield from evt.wait().__await__()
if exc is not None:
raise exc
return res # noqa: F821
return res

Check failure on line 65 in tests/py/utils/trio.py

View workflow job for this annotation

GitHub Actions / check

Ruff (F821)

tests/py/utils/trio.py:65:24: F821 Undefined name `res`

Check failure on line 65 in tests/py/utils/trio.py

View workflow job for this annotation

GitHub Actions / check

Ruff (F821)

tests/py/utils/trio.py:65:24: F821 Undefined name `res`

return Future()

Expand Down
Loading