Skip to content

Commit

Permalink
chore: udpate ruff config and format (#169)
Browse files Browse the repository at this point in the history
* chore: udpate ruff config and format

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* chore: some updates to GH

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* Apply suggestions from code review

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii authored Jun 4, 2024
1 parent 4bd1b5b commit cebeff7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
types:
- published

concurrency:
group: ${ github.workflow }-${ github.ref }
cancel-in-progress: true

jobs:
pre-commit:
name: Format
Expand Down
6 changes: 1 addition & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
- id: black

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand All @@ -23,6 +18,7 @@ repos:
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,11 @@ uproot-browser tree ../scikit-hep-testdata/src/skhep_testdata/data/uproot-Event.
## Development

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

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.

[actions-badge]: https://github.com/scikit-hep/uproot-browser/workflows/CI/badge.svg
[actions-link]: https://github.com/scikit-hep/uproot-browser/actions
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
[black-link]: https://github.com/psf/black
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/uproot-browser
[conda-link]: https://github.com/conda-forge/uproot-browser-feedstock
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
Expand Down
12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ messages_control.disable = [
]

[tool.ruff]
select = [
"E", "F", "W", # flake8
src = ["src"]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
Expand All @@ -157,16 +159,12 @@ ignore = [
"RUF001", # Unicode chars
"PLR",
]
src = ["src"]
typing-modules = ["uproot_browser._compat.typing"]
unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
"SIM118", # Dict .keys() removal (uproot)
]
exclude = []

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"noxfile.py" = ["T20"]
"tests/*" = ["T20"]
"src/uproot_browser/tree.py" = ["UP006"]

0 comments on commit cebeff7

Please sign in to comment.