Skip to content

Commit 9bc32c3

Browse files
ZzEeKkAaDiptorup Deb
authored andcommitted
Add pylint to pre-commit
1 parent a62359a commit 9bc32c3

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

.github/workflows/pre-commit.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ on:
88
jobs:
99
pre-commit:
1010
runs-on: ubuntu-20.04
11+
defaults:
12+
run:
13+
shell: bash -el {0}
1114
steps:
1215
- uses: actions/checkout@v3
13-
- uses: actions/setup-python@v3
16+
- uses: conda-incubator/setup-miniconda@v2
1417
with:
1518
python-version: '3.11'
16-
- uses: pre-commit/[email protected]
19+
activate-environment: "coverage"
20+
channel-priority: "disabled"
21+
environment-file: environment/pre-commit.yml
22+
- uses: actions/cache@v3
23+
with:
24+
path: ~/.cache/pre-commit
25+
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
26+
- run: pre-commit run --show-diff-on-failure --color=always --all-files

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,17 @@ repos:
4747
args: ["-i"]
4848
exclude: "numba_dpex/dpnp_iface"
4949
types_or: [c++, c]
50+
- repo: local
51+
hooks:
52+
- id: pylint
53+
name: pylint
54+
entry: pylint
55+
files: ^numba_dpex/experimental
56+
language: system
57+
types: [python]
58+
require_serial: true
59+
args:
60+
[
61+
"-rn", # Only display messages
62+
"-sn", # Don't display the score
63+
]

environment/pre-commit.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: dev
2+
channels:
3+
- dppy/label/dev
4+
- numba
5+
- intel
6+
- conda-forge
7+
- nodefaults
8+
dependencies:
9+
- libffi
10+
- gxx_linux-64
11+
- dpcpp_linux-64
12+
- numba==0.58*
13+
- dpctl
14+
- dpnp
15+
- dpcpp-llvm-spirv
16+
- opencl_rt
17+
- coverage
18+
- pytest
19+
- pytest-cov
20+
- pytest-xdist
21+
- pexpect
22+
- scikit-build>=0.15*
23+
- cmake>=3.26*
24+
- pre-commit
25+
- pylint

0 commit comments

Comments
 (0)