Skip to content

Commit 0fc8f35

Browse files
authored
Merge pull request #107 from posit-dev/trailing-comma
Remove unwanted trailing commas
2 parents adccdd9 + 60ddc67 commit 0fc8f35

File tree

9 files changed

+20
-22
lines changed

9 files changed

+20
-22
lines changed

examples/python/basic_app/app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
from shiny.express import ui, input, render
1+
from shiny.express import input, render, ui
22

3-
4-
ui.input_slider("n", "N", 0, 100, 20),
3+
ui.input_slider("n", "N", 0, 100, 20)
54

65

76
@render.text

examples/python/cpuinfo/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def reset_history():
9393
"copper": "copper",
9494
"prism": "prism (not recommended)",
9595
},
96-
),
96+
)
9797
ui.input_action_button("reset", "Clear history", class_="btn-sm")
9898
ui.input_switch("hold", "Freeze output", value=False)
9999

examples/python/file_upload/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77

88
MAX_SIZE = 50000
9-
ui.input_file("file1", "Choose a file to upload:", multiple=True),
10-
ui.input_radio_buttons("type", "Type:", ["Text", "Binary"]),
9+
ui.input_file("file1", "Choose a file to upload:", multiple=True)
10+
ui.input_radio_buttons("type", "Type:", ["Text", "Binary"])
1111

1212

1313
def format_hexdump(data: bytes) -> str:

examples/python/multiple_source_files/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from shiny.express import ui, input, render
1+
from shiny.express import input, render, ui
22
from utils import square
33

4-
ui.input_slider("n", "N", 0, 100, 20),
4+
ui.input_slider("n", "N", 0, 100, 20)
55

66

77
@render.text

examples/python/reactive_calc/app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
# change.
44

55
from shiny import reactive
6-
from shiny.express import ui, input, render
6+
from shiny.express import input, render, ui
77

8-
9-
ui.input_slider("x", "Choose a number", 1, 100, 50),
8+
ui.input_slider("x", "Choose a number", 1, 100, 50)
109

1110

1211
@reactive.Calc

examples/python/reactive_effect/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# disk, or sending messages to a server.
44

55
from shiny import reactive
6-
from shiny.express import ui, input
6+
from shiny.express import input, ui
77

8-
ui.input_text("x", "Text input", placeholder="Enter text"),
8+
ui.input_text("x", "Text input", placeholder="Enter text")
99

1010

1111
@reactive.Effect

examples/python/reactive_event/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from shiny import reactive
66
from shiny.express import ui, input, render
77

8-
ui.input_slider("n", "N", 0, 20, 10),
9-
ui.input_action_button("btn", "Click me"),
10-
ui.tags.br(),
11-
"The value of the slider when the button was last clicked:",
8+
ui.input_slider("n", "N", 0, 20, 10)
9+
ui.input_action_button("btn", "Click me")
10+
ui.tags.br()
11+
"The value of the slider when the button was last clicked:"
1212

1313

1414
@reactive.Effect

examples/python/reactive_value/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
from shiny import reactive
2121
from shiny.express import ui, input, render
2222

23-
ui.h3("Press the button:"),
24-
ui.input_action_button("btn", "Time"),
25-
ui.h3("Time between button presses:"),
23+
ui.h3("Press the button:")
24+
ui.input_action_button("btn", "Time")
25+
ui.h3("Time between button presses:")
2626

2727

2828
# A reactive.Value with an array tracking timestamps of all button presses.

examples/python/regularization/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
ui.tags.script(
2121
src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
22-
),
22+
)
2323
ui.tags.script("if (window.MathJax) MathJax.Hub.Queue(['Typeset', MathJax.Hub]);")
2424

2525

@@ -32,7 +32,7 @@ def models():
3232

3333

3434
with ui.div(class_="col-md-10 col-lg-8 py-5 mx-auto text-lg-center text-left"):
35-
ui.h3("How Does Regularization Strength Affect Coefficient Estimates?"),
35+
ui.h3("How Does Regularization Strength Affect Coefficient Estimates?")
3636

3737
with ui.div(class_="col-md-78 col-lg-5 py-4 mx-auto"):
3838
ui.input_slider(

0 commit comments

Comments
 (0)