Skip to content

Commit 780328f

Browse files
committed
modify linting configs
1 parent 3c4a6a3 commit 780328f

File tree

3 files changed

+33
-11
lines changed

3 files changed

+33
-11
lines changed

.github/workflows/black.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.10' # or any version your project uses
16+
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install black==25.1.0 ruff==0.12.2
21+
22+
- name: Run Black
23+
run: black --check .
24+
25+
- name: Run Ruff (no formatting)
26+
run: ruff check . --no-fix

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: "24.2.0"
3+
rev: "25.1.0"
44
hooks:
55
- id: black
66
- id: black-jupyter # for formatting jupyter-notebook
@@ -23,3 +23,9 @@ repos:
2323
- id: check-yaml
2424
- id: end-of-file-fixer
2525
- id: trailing-whitespace
26+
27+
- repo: https://github.com/astral-sh/ruff-pre-commit
28+
rev: v0.12.2
29+
hooks:
30+
- id: ruff
31+
args: [--fix]

0 commit comments

Comments
 (0)