Skip to content

Commit

Permalink
Add linting action
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Shotwell committed Dec 7, 2023
1 parent bf5c115 commit 7a7556d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff
on: [pull_request]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
5 changes: 3 additions & 2 deletions sampling-dashboard/panel/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

def first_taxi(data):
if data.empty:
return '## First taxi id: *NA*'
return "## First taxi id: *NA*"

return f'## First taxi id: *{data["taxi_id"].iloc[0]}*'


pn.extension(
sizing_mode="stretch_width",
)
Expand Down Expand Up @@ -38,7 +39,7 @@ def first_taxi(data):
main=[
pn.bind(first_taxi, sample_data),
pn.pane.Matplotlib(pn.bind(plot_tips, sample_data, scale_input), height=600),
pn.pane.Matplotlib(pn.bind(plot_hist, sample_data), height=600 ),
pn.pane.Matplotlib(pn.bind(plot_hist, sample_data), height=600),
],
main_max_width="850px",
).servable()

0 comments on commit 7a7556d

Please sign in to comment.