Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into pr/1210
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Oct 29, 2024
2 parents a9ba5db + f81c168 commit eb48779
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/.hatch-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"
node-version: "23.x"
registry-url: ${{ inputs.node-registry-url }}
- name: Pin NPM Version
run: npm install -g [email protected]
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ detached = true
dependencies = [
"invoke",
# lint
"black==24.1.1", # Pin lint tools we don't control to avoid breaking changes
"ruff==0.0.278", # Pin lint tools we don't control to avoid breaking changes
"black==24.1.1", # Pin lint tools we don't control to avoid breaking changes
"ruff==0.0.278", # Pin lint tools we don't control to avoid breaking changes
"toml",
"flake8==7.0.0", # Pin lint tools we don't control to avoid breaking changes
"flake8==7.0.0", # Pin lint tools we don't control to avoid breaking changes
"flake8-pyproject",
"reactpy-flake8 >=0.7",
# types
"mypy",
"types-toml",
Expand Down
3 changes: 1 addition & 2 deletions src/py/reactpy/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ REACTPY_DEBUG_MODE = "1"
[tool.hatch.envs.lint]
features = ["all"]
dependencies = [
"mypy>=1.0.0",
"mypy==1.8",
"types-click",
"types-tornado",
"types-pkg-resources",
"types-flask",
"types-requests",
]
Expand Down
2 changes: 1 addition & 1 deletion src/py/reactpy/reactpy/core/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __init__(
self.stop_propagation = stop_propagation
self.target = target

def __eq__(self, other: Any) -> bool:
def __eq__(self, other: object) -> bool:
undefined = object()
for attr in (
"function",
Expand Down
2 changes: 1 addition & 1 deletion src/py/reactpy/reactpy/core/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def __aenter__(self) -> Layout:

return self

async def __aexit__(self, *exc: Any) -> None:
async def __aexit__(self, *exc: object) -> None:
root_csid = self._root_life_cycle_state_id
root_model_state = self._model_states_by_life_cycle_state_id[root_csid]

Expand Down
2 changes: 1 addition & 1 deletion src/py/reactpy/reactpy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def set_current(self, new: _RefValue) -> _RefValue:
self.current = new
return old

def __eq__(self, other: Any) -> bool:
def __eq__(self, other: object) -> bool:
try:
return isinstance(other, Ref) and (other.current == self.current)
except AttributeError:
Expand Down
5 changes: 5 additions & 0 deletions src/py/reactpy/tests/test_backend/test_all.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from collections.abc import MutableMapping

import pytest
Expand Down Expand Up @@ -106,6 +107,10 @@ def ShowScope():
assert isinstance(scope.current, MutableMapping)


@pytest.mark.skipIf(
sys.platform == "darwin",
reason="Tornado and Flask backends are currently buggy on MacOS.",
)
async def test_use_location(display: DisplayFixture):
location = reactpy.Ref()

Expand Down
2 changes: 1 addition & 1 deletion src/py/reactpy/tests/test_core/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def inner_click_no_op(event):
clicked.current = True

def outer_click_is_not_triggered(event):
raise AssertionError()
raise AssertionError

outer = reactpy.html.div(
{
Expand Down

0 comments on commit eb48779

Please sign in to comment.