Skip to content

Commit 4424d59

Browse files
committed
Handle remaining warnings
1 parent 51ebc22 commit 4424d59

File tree

9 files changed

+6
-7
lines changed

9 files changed

+6
-7
lines changed

docs/examples/python/pyodide_js_module.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
@component
66
def root():
7-
8-
def onClick(event):
7+
def on_click(event):
98
js.document.title = "New window title"
109

11-
return html.button({"onClick": onClick}, "Click Me!")
10+
return html.button({"onClick": on_click}, "Click Me!")

docs/overrides/homepage_examples/add_interactivity.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: INP001
12
# pylint: disable=assignment-from-no-return, unnecessary-lambda
23
from reactpy import component, html, use_state
34

docs/overrides/homepage_examples/create_user_interfaces.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: INP001
12
from reactpy import component, html
23

34

docs/overrides/homepage_examples/write_components_with_python.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: INP001
12
from reactpy import component, html
23

34

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ lint.extend-ignore = [
214214
"PLR6301", # Method could be a function, class method, or static method
215215
"S403", # `dill` module is possibly insecure
216216
"S301", # `dill` deserialization is possibly insecure unless using trusted data
217+
"RUF029", # Function is declared async but doesn't contain await expression
217218
]
218219
lint.preview = true
219220
lint.isort.known-first-party = ["reactpy_django", "test_app", "example"]

tests/test_app/channel_layers/components.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# ruff: noqa: RUF029
21
from reactpy import component, hooks, html
32

43
from reactpy_django.hooks import use_channel_layer

tests/test_app/components.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# ruff: noqa: RUF029
21
import asyncio
32
import inspect
43
from pathlib import Path

tests/test_app/performance/components.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# ruff: noqa: RUF029
21
from django.utils import timezone
32
from reactpy import component, hooks, html
43

tests/test_app/views.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# ruff: noqa: RUF029
21
import inspect
32
from itertools import cycle
43

0 commit comments

Comments
 (0)