Skip to content

Commit

Permalink
Add pylint to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed Oct 26, 2023
1 parent b14fdec commit aad1184
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ on:
jobs:
pre-commit:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: '3.10'
activate-environment: "coverage"
channel-priority: "disabled"
environment-file: environment/pre-commit.yml
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always --all-files
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,17 @@ repos:
args: ["-i"]
exclude: "numba_dpex/dpnp_iface"
types_or: [c++, c]
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
files: ^numba_dpex/experimental
language: system
types: [python]
require_serial: true
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
]
25 changes: 25 additions & 0 deletions environment/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: dev
channels:
- dppy/label/dev
- numba
- intel
- conda-forge
- nodefaults
dependencies:
- libffi
- gxx_linux-64
- dpcpp_linux-64
- numba==0.58*
- dpctl
- dpnp
- dpcpp-llvm-spirv
- opencl_rt
- coverage
- pytest
- pytest-cov
- pytest-xdist
- pexpect
- scikit-build>=0.15*
- cmake>=3.26*
- pre-commit
- pylint

0 comments on commit aad1184

Please sign in to comment.