Skip to content

Commit

Permalink
chore: update to working version of ruff-formatter
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Nov 17, 2023
1 parent bfad20f commit 5161412
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.5"
rev: "v0.1.6"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down Expand Up @@ -83,7 +83,7 @@ repos:
exclude: .pre-commit-config.yaml

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.4
rev: v17.0.5
hooks:
- id: clang-format
types_or: [c++]
Expand Down
30 changes: 15 additions & 15 deletions notebooks/BoostHistogramHandsOn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
}
],
"source": [
"plt.bar(hist1.axes[0].centers, hist1.values(), width=hist1.axes[0].widths)"
"plt.bar(hist1.axes[0].centers, hist1.values(), width=hist1.axes[0].widths);"
]
},
{
Expand All @@ -192,7 +192,7 @@
"metadata": {},
"outputs": [],
"source": [
"plothist = lambda h: plt.bar(*h.axes.centers, h.values(), width=h.axes.widths[0])"
"plothist = lambda h: plt.bar(*h.axes.centers, h.values(), width=h.axes.widths[0]);"
]
},
{
Expand Down Expand Up @@ -225,7 +225,7 @@
}
],
"source": [
"plt.step(hist1.axes[0].edges[:-1], hist1.values(), where=\"post\")"
"plt.step(hist1.axes[0].edges[:-1], hist1.values(), where=\"post\");"
]
},
{
Expand Down Expand Up @@ -258,7 +258,7 @@
}
],
"source": [
"plt.stairs(hist1.values(), hist1.axes[0].edges)"
"plt.stairs(hist1.values(), hist1.axes[0].edges);"
]
},
{
Expand Down Expand Up @@ -368,7 +368,7 @@
],
"source": [
"hist2 = bh.numpy.histogram(data1, bins=\"auto\", histogram=bh.Histogram)\n",
"plothist(hist2)"
"plothist(hist2);"
]
},
{
Expand Down Expand Up @@ -523,7 +523,7 @@
}
],
"source": [
"plothist2d(hist3)"
"plothist2d(hist3);"
]
},
{
Expand Down Expand Up @@ -595,7 +595,7 @@
}
],
"source": [
"plothist2d(hist3d.project(0, 1))"
"plothist2d(hist3d.project(0, 1));"
]
},
{
Expand Down Expand Up @@ -630,7 +630,7 @@
}
],
"source": [
"plothist2d(hist3)"
"plothist2d(hist3);"
]
},
{
Expand Down Expand Up @@ -663,7 +663,7 @@
}
],
"source": [
"plothist2d(hist3[:, bh.loc(0.25) : bh.loc(0.75)])"
"plothist2d(hist3[:, bh.loc(0.25) : bh.loc(0.75)]);"
]
},
{
Expand Down Expand Up @@ -763,7 +763,7 @@
],
"source": [
"plothist(hist3[:, :: bh.sum])\n",
"plothist(hist3[:: bh.sum, :])"
"plothist(hist3[:: bh.sum, :]);"
]
},
{
Expand Down Expand Up @@ -796,7 +796,7 @@
}
],
"source": [
"plothist2d(hist3[: 50 : bh.rebin(2), 50 :: bh.rebin(2)])"
"plothist2d(hist3[: 50 : bh.rebin(2), 50 :: bh.rebin(2)]);"
]
},
{
Expand Down Expand Up @@ -1065,7 +1065,7 @@
" 10,\n",
"]\n",
"d7, e7 = np.histogram(data1 - 3.5, bins=bins, density=True)\n",
"plt.hist(data1 - 3.5, bins=bins, density=True)"
"plt.hist(data1 - 3.5, bins=bins, density=True);"
]
},
{
Expand Down Expand Up @@ -1143,7 +1143,7 @@
}
],
"source": [
"plt.bar(hist7.axes[0].centers, view, width=hist7.axes[0].widths)"
"plt.bar(hist7.axes[0].centers, view, width=hist7.axes[0].widths);"
]
},
{
Expand Down Expand Up @@ -1214,7 +1214,7 @@
}
],
"source": [
"plothist2d(hist8)"
"plothist2d(hist8);"
]
},
{
Expand Down Expand Up @@ -1276,7 +1276,7 @@
],
"source": [
"ax = plt.subplot(111, polar=True)\n",
"plothist(hist9)"
"plothist(hist9);"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion notebooks/aghast.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
],
"source": [
"h = bh.Histogram(uproot_hist)\n",
"plt.bar(h.axes[0].centers, h.values(), width=h.axes[0].widths)"
"plt.bar(h.axes[0].centers, h.values(), width=h.axes[0].widths);"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/xarray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"source": [
"bh_bins = bh.axis.Regular(19, -4, 4)\n",
"bh_hist = bh.Histogram(bh_bins).fill(np.asarray(da).flatten())\n",
"plt.plot(bh_hist.axes[0].centers, bh_hist.values())"
"plt.plot(bh_hist.axes[0].centers, bh_hist.values());"
]
},
{
Expand Down Expand Up @@ -224,7 +224,7 @@
"source": [
"h = bh_xhistogram(da, bins=[bins])\n",
"display(h)\n",
"h.plot()"
"h.plot();"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ extend-select = [
ignore = [
"PLR", # Design related pylint codes
"E501", # Line too long
"PT011", "PT013"
"PT011", "PT013", # Incorrect pytest codes
"ISC001", # Conflicts with the formatter
]
unfixable = [
"T20", # Removes print statements
Expand Down

0 comments on commit 5161412

Please sign in to comment.