Skip to content

Commit d84a8b4

Browse files
authored
Modernise tooling (#1055)
* Switch to uv + ruff + just * Configure ruff * Format * Migrate nox and invoke tasks to just * Landing page typos * Update actions * Update prettier config * Format JS * Install just in workflow * Uv run dash-generate-components * Update prettier * Update contribution guide
1 parent c166d90 commit d84a8b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+108
-284
lines changed

components_page/__init__.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ def register_apps():
143143

144144
for slug, kwargs in component_bodies.items():
145145
requests_pathname_prefix = (
146-
f"/docs/components/{slug}/"
147-
if slug != "index"
148-
else "/docs/components/"
146+
f"/docs/components/{slug}/" if slug != "index" else "/docs/components/"
149147
)
150148
app = dash.Dash(
151149
external_stylesheets=["/static/loading.css"],
@@ -162,13 +160,9 @@ def register_apps():
162160
app.title = f"{_get_label(slug)} - dbc docs"
163161

164162
if slug == "layout":
165-
app.layout = html.Div(
166-
parse(app, **kwargs), className="layout-demo"
167-
)
163+
app.layout = html.Div(parse(app, **kwargs), className="layout-demo")
168164
elif slug == "button_group":
169-
app.layout = html.Div(
170-
parse(app, **kwargs), className="button-group-demo"
171-
)
165+
app.layout = html.Div(parse(app, **kwargs), className="button-group-demo")
172166
else:
173167
app.layout = parse(app, **kwargs)
174168
if slug == "index":

components_page/components/alert/auto_dismiss.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
alert = html.Div(
55
[
6-
dbc.Button(
7-
"Toggle", id="alert-toggle-auto", className="me-1", n_clicks=0
8-
),
6+
dbc.Button("Toggle", id="alert-toggle-auto", className="me-1", n_clicks=0),
97
html.Hr(),
108
dbc.Alert(
119
"Hello! I am an auto-dismissing alert!",

components_page/components/alert/dismiss.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
className="me-1",
1010
n_clicks=0,
1111
),
12-
dbc.Button(
13-
"Toggle alert without fade", id="alert-toggle-no-fade", n_clicks=0
14-
),
12+
dbc.Button("Toggle alert without fade", id="alert-toggle-no-fade", n_clicks=0),
1513
html.Hr(),
1614
dbc.Alert(
1715
"Hello! I am an alert",

components_page/components/badge/links.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
text_color="dark",
4747
className="me-1 text-decoration-none",
4848
),
49-
dbc.Badge(
50-
"Dark", href="#", color="dark", className="text-decoration-none"
51-
),
49+
dbc.Badge("Dark", href="#", color="dark", className="text-decoration-none"),
5250
]
5351
)

components_page/components/badge/text_color.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,8 @@
3333
text_color="danger",
3434
className="border me-1",
3535
),
36-
dbc.Badge(
37-
"Info", color="white", text_color="info", className="border me-1"
38-
),
39-
dbc.Badge(
40-
"Dark", color="white", text_color="dark", className="border me-1"
41-
),
36+
dbc.Badge("Info", color="white", text_color="info", className="border me-1"),
37+
dbc.Badge("Dark", color="white", text_color="dark", className="border me-1"),
4238
dbc.Badge(
4339
"Black",
4440
color="white",
@@ -57,8 +53,6 @@
5753
text_color="light",
5854
className="border me-1",
5955
),
60-
dbc.Badge(
61-
"White", color="secondary", text_color="white", className="border"
62-
),
56+
dbc.Badge("White", color="secondary", text_color="white", className="border"),
6357
]
6458
)

components_page/components/button/outline.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
buttons = html.Div(
55
[
66
dbc.Button("Primary", outline=True, color="primary", className="me-1"),
7-
dbc.Button(
8-
"Secondary", outline=True, color="secondary", className="me-1"
9-
),
7+
dbc.Button("Secondary", outline=True, color="secondary", className="me-1"),
108
dbc.Button("Success", outline=True, color="success", className="me-1"),
119
dbc.Button("Warning", outline=True, color="warning", className="me-1"),
1210
dbc.Button("Danger", outline=True, color="danger", className="me-1"),

components_page/components/button/usage.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
button = html.Div(
55
[
6-
dbc.Button(
7-
"Click me", id="example-button", className="me-2", n_clicks=0
8-
),
6+
dbc.Button("Click me", id="example-button", className="me-2", n_clicks=0),
97
html.Span(id="example-output", style={"verticalAlign": "middle"}),
108
]
119
)

components_page/components/card/color.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
dbc.Row(
2020
[
2121
dbc.Col(dbc.Card(card_content, color="primary", inverse=True)),
22-
dbc.Col(
23-
dbc.Card(card_content, color="secondary", inverse=True)
24-
),
22+
dbc.Col(dbc.Card(card_content, color="secondary", inverse=True)),
2523
dbc.Col(dbc.Card(card_content, color="info", inverse=True)),
2624
],
2725
className="mb-4",

components_page/components/card/image_overlay.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
[
1414
html.H4("Card title", className="card-title"),
1515
html.P(
16-
"An example of using an image in the background of "
17-
"a card.",
16+
"An example of using an image in the background of " "a card.",
1817
className="card-text",
1918
),
2019
dbc.Button("Go somewhere", color="primary"),

components_page/components/card/layout/group.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
"bit longer than the second card.",
1313
className="card-text",
1414
),
15-
dbc.Button(
16-
"Click here", color="success", className="mt-auto"
17-
),
15+
dbc.Button("Click here", color="success", className="mt-auto"),
1816
]
1917
)
2018
),
@@ -26,9 +24,7 @@
2624
"This card has some text content.",
2725
className="card-text",
2826
),
29-
dbc.Button(
30-
"Click here", color="warning", className="mt-auto"
31-
),
27+
dbc.Button("Click here", color="warning", className="mt-auto"),
3228
]
3329
)
3430
),
@@ -43,9 +39,7 @@
4339
"card group.",
4440
className="card-text",
4541
),
46-
dbc.Button(
47-
"Click here", color="danger", className="mt-auto"
48-
),
42+
dbc.Button("Click here", color="danger", className="mt-auto"),
4943
]
5044
)
5145
),

0 commit comments

Comments
 (0)