Skip to content

Commit cebeff7

Browse files
authored
chore: udpate ruff config and format (#169)
* chore: udpate ruff config and format Signed-off-by: Henry Schreiner <[email protected]> * chore: some updates to GH Signed-off-by: Henry Schreiner <[email protected]> * Apply suggestions from code review --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent 4bd1b5b commit cebeff7

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

.github/workflows/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
types:
1111
- published
1212

13+
concurrency:
14+
group: ${ github.workflow }-${ github.ref }
15+
cancel-in-progress: true
16+
1317
jobs:
1418
pre-commit:
1519
name: Format

.pre-commit-config.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
repos:
2-
- repo: https://github.com/psf/black-pre-commit-mirror
3-
rev: 24.4.2
4-
hooks:
5-
- id: black
6-
72
- repo: https://github.com/pre-commit/pre-commit-hooks
83
rev: v4.6.0
94
hooks:
@@ -23,6 +18,7 @@ repos:
2318
hooks:
2419
- id: ruff
2520
args: ["--fix", "--show-fixes"]
21+
- id: ruff-format
2622

2723
- repo: https://github.com/pre-commit/mirrors-mypy
2824
rev: v1.10.0

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,11 @@ uproot-browser tree ../scikit-hep-testdata/src/skhep_testdata/data/uproot-Event.
170170
## Development
171171

172172
[![pre-commit.ci status][pre-commit-badge]][pre-commit-link]
173-
[![Code style: black][black-badge]][black-link]
174173

175174
See [CONTRIBUTING.md](https://github.com/scikit-hep/uproot-browser/blob/main/.github/CONTRIBUTING.md) for details on how to set up a development environment.
176175

177176
[actions-badge]: https://github.com/scikit-hep/uproot-browser/workflows/CI/badge.svg
178177
[actions-link]: https://github.com/scikit-hep/uproot-browser/actions
179-
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
180-
[black-link]: https://github.com/psf/black
181178
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/uproot-browser
182179
[conda-link]: https://github.com/conda-forge/uproot-browser-feedstock
183180
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github

pyproject.toml

+5-7
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ messages_control.disable = [
130130
]
131131

132132
[tool.ruff]
133-
select = [
134-
"E", "F", "W", # flake8
133+
src = ["src"]
134+
135+
[tool.ruff.lint]
136+
extend-select = [
135137
"B", # flake8-bugbear
136138
"I", # isort
137139
"ARG", # flake8-unused-arguments
@@ -157,16 +159,12 @@ ignore = [
157159
"RUF001", # Unicode chars
158160
"PLR",
159161
]
160-
src = ["src"]
161162
typing-modules = ["uproot_browser._compat.typing"]
162163
unfixable = [
163-
"T20", # Removes print statements
164-
"F841", # Removes unused variables
165164
"SIM118", # Dict .keys() removal (uproot)
166165
]
167-
exclude = []
168166

169-
[tool.ruff.per-file-ignores]
167+
[tool.ruff.lint.per-file-ignores]
170168
"noxfile.py" = ["T20"]
171169
"tests/*" = ["T20"]
172170
"src/uproot_browser/tree.py" = ["UP006"]

0 commit comments

Comments
 (0)