Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
activate-environment: precommit
environment-file: ops/conda_env/pre-commit.yml
use-mamba: true
- name: Update pre-commit hooks
- name: Run pre-commit checks
run: |
pre-commit install
pre-commit run --all-files --color always
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ["--maxkb=4000"]
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.2
rev: v0.16.6
hooks:
- id: cython-lint
- id: double-quote-cython-strings
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.2.0
hooks:
- id: flake8
args: [--config=.flake8]
Expand All @@ -50,7 +50,7 @@ repos:
args: ["-i", "--style=file:.clang-format"]
language: python
additional_dependencies: [clang-format>=15.0]
types_or: [c, c++]
types_or: [c++]
- id: cpplint
language: python
args: [
Expand All @@ -60,12 +60,12 @@ repos:
additional_dependencies: [cpplint==1.6.1]
types_or: [c++]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.16.0
hooks:
- id: mypy
additional_dependencies: [types-setuptools, numpy]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
rev: v0.11.13
hooks:
- id: ruff
args: ["--config", "python/pyproject.toml"]
4 changes: 3 additions & 1 deletion python/treelite/sklearn/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def import_model(sklearn_model) -> Model:
from sklearn.ensemble import (
HistGradientBoostingRegressor as HistGradientBoostingR,
)
from sklearn.ensemble import IsolationForest
from sklearn.ensemble import (
IsolationForest,
)
from sklearn.ensemble import RandomForestClassifier as RandomForestC
from sklearn.ensemble import RandomForestRegressor as RandomForestR
except ImportError as e:
Expand Down
Loading