Skip to content

Commit

Permalink
Merge pull request #107 from posit-dev/trailing-comma
Browse files Browse the repository at this point in the history
Remove unwanted trailing commas
  • Loading branch information
cpsievert authored Jan 29, 2024
2 parents adccdd9 + 60ddc67 commit 0fc8f35
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 22 deletions.
5 changes: 2 additions & 3 deletions examples/python/basic_app/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from shiny.express import ui, input, render
from shiny.express import input, render, ui


ui.input_slider("n", "N", 0, 100, 20),
ui.input_slider("n", "N", 0, 100, 20)


@render.text
Expand Down
2 changes: 1 addition & 1 deletion examples/python/cpuinfo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def reset_history():
"copper": "copper",
"prism": "prism (not recommended)",
},
),
)
ui.input_action_button("reset", "Clear history", class_="btn-sm")
ui.input_switch("hold", "Freeze output", value=False)

Expand Down
4 changes: 2 additions & 2 deletions examples/python/file_upload/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@


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


def format_hexdump(data: bytes) -> str:
Expand Down
4 changes: 2 additions & 2 deletions examples/python/multiple_source_files/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from shiny.express import ui, input, render
from shiny.express import input, render, ui
from utils import square

ui.input_slider("n", "N", 0, 100, 20),
ui.input_slider("n", "N", 0, 100, 20)


@render.text
Expand Down
5 changes: 2 additions & 3 deletions examples/python/reactive_calc/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# change.

from shiny import reactive
from shiny.express import ui, input, render
from shiny.express import input, render, ui


ui.input_slider("x", "Choose a number", 1, 100, 50),
ui.input_slider("x", "Choose a number", 1, 100, 50)


@reactive.Calc
Expand Down
4 changes: 2 additions & 2 deletions examples/python/reactive_effect/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# disk, or sending messages to a server.

from shiny import reactive
from shiny.express import ui, input
from shiny.express import input, ui

ui.input_text("x", "Text input", placeholder="Enter text"),
ui.input_text("x", "Text input", placeholder="Enter text")


@reactive.Effect
Expand Down
8 changes: 4 additions & 4 deletions examples/python/reactive_event/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from shiny import reactive
from shiny.express import ui, input, render

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


@reactive.Effect
Expand Down
6 changes: 3 additions & 3 deletions examples/python/reactive_value/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
from shiny import reactive
from shiny.express import ui, input, render

ui.h3("Press the button:"),
ui.input_action_button("btn", "Time"),
ui.h3("Time between button presses:"),
ui.h3("Press the button:")
ui.input_action_button("btn", "Time")
ui.h3("Time between button presses:")


# A reactive.Value with an array tracking timestamps of all button presses.
Expand Down
4 changes: 2 additions & 2 deletions examples/python/regularization/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

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


Expand All @@ -32,7 +32,7 @@ def models():


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

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

0 comments on commit 0fc8f35

Please sign in to comment.