shunk031 commited on
Commit
85453b9
1 Parent(s): c5c501c

Use ruff (#7)

Browse files

* use ruff instead of flake8 and isort

* update CI

Files changed (3) hide show
  1. .github/workflows/ci.yaml +10 -6
  2. poetry.lock +0 -0
  3. pyproject.toml +1 -3
.github/workflows/ci.yaml CHANGED
@@ -6,19 +6,20 @@ on:
6
  pull_request:
7
  branches: [main]
8
  paths-ignore:
9
- - 'README.md'
10
 
11
  jobs:
12
  test:
13
  runs-on: ubuntu-latest
14
  strategy:
15
  matrix:
16
- python-version: ['3.8', '3.9', '3.10']
17
 
18
  steps:
19
- - uses: actions/checkout@v2
 
20
  - name: Set up Python ${{ matrix.python-version }}
21
- uses: actions/setup-python@v2
22
  with:
23
  python-version: ${{ matrix.python-version }}
24
 
@@ -26,12 +27,15 @@ jobs:
26
  run: |
27
  pip install -U pip setuptools wheel poetry
28
  poetry install
 
29
  - name: Format
30
  run: |
31
  poetry run black --check .
 
32
  - name: Lint
33
  run: |
34
- poetry run flake8 . --ignore=E501,W503,E203
 
35
  - name: Type check
36
  run: |
37
  poetry run mypy . \
@@ -39,7 +43,7 @@ jobs:
39
  --no-strict-optional \
40
  --no-site-packages \
41
  --cache-dir=/dev/null
42
-
43
  - name: Run tests
44
  run: |
45
  poetry run pytest --color=yes -rf
 
6
  pull_request:
7
  branches: [main]
8
  paths-ignore:
9
+ - "README.md"
10
 
11
  jobs:
12
  test:
13
  runs-on: ubuntu-latest
14
  strategy:
15
  matrix:
16
+ python-version: ["3.8", "3.9", "3.10"]
17
 
18
  steps:
19
+ - uses: actions/checkout@v4
20
+
21
  - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v4
23
  with:
24
  python-version: ${{ matrix.python-version }}
25
 
 
27
  run: |
28
  pip install -U pip setuptools wheel poetry
29
  poetry install
30
+
31
  - name: Format
32
  run: |
33
  poetry run black --check .
34
+
35
  - name: Lint
36
  run: |
37
+ poetry run ruff .
38
+
39
  - name: Type check
40
  run: |
41
  poetry run mypy . \
 
43
  --no-strict-optional \
44
  --no-site-packages \
45
  --cache-dir=/dev/null
46
+
47
  - name: Run tests
48
  run: |
49
  poetry run pytest --color=yes -rf
poetry.lock CHANGED
The diff for this file is too large to render. See raw diff
 
pyproject.toml CHANGED
@@ -10,11 +10,9 @@ packages = []
10
  python = ">=3.8.1,<4.0"
11
  datasets = "^2.8.0"
12
 
13
-
14
  [tool.poetry.group.dev.dependencies]
 
15
  black = "^22.12.0"
16
- isort = "^5.11.4"
17
- flake8 = "^6.0.0"
18
  mypy = "^0.991"
19
  pytest = "^7.2.1"
20
 
 
10
  python = ">=3.8.1,<4.0"
11
  datasets = "^2.8.0"
12
 
 
13
  [tool.poetry.group.dev.dependencies]
14
+ ruff = "^0.1.3"
15
  black = "^22.12.0"
 
 
16
  mypy = "^0.991"
17
  pytest = "^7.2.1"
18