Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format all python files with ruff and enable it in pre-commit #206

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ repos:
entry: .github/scripts/clang-format-hook
types: [c++]
language: system
# - id: pylint
# name: pylint
# entry: 'pylint --rcfile=.github/scripts/pylint.rc --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"'
# types: [python]
# language: system
# - id: flake8
# name: flake8
# entry: flake8
# types: [python]
# language: system
- id: ruff-format
name: ruff-format
entry: ruff format --force-exclude
types: [python]
language: system

- repo: https://github.com/johann-petrak/licenseheaders.git
rev: 'v0.8.8'
hooks:
Expand Down
10 changes: 10 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
target-version = "py311"

line-length = 99

[format]
# Make things format the same way as black
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
3,208 changes: 1,941 additions & 1,267 deletions k4MarlinWrapper/examples/clicRec_e4h_input.py

Large diffs are not rendered by default.

Loading
Loading