Skip to content

Commit

Permalink
Update Build Linting (#81)
Browse files Browse the repository at this point in the history
* Update build linting
  • Loading branch information
reidjohnson authored Sep 2, 2024
1 parent 7065c8c commit 03d238c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ jobs:
- name: Check Python formatting with black
run: |
black --line-length 99 --diff --color .
black --line-length=99 --check .
black --diff --color .
black --check .
- name: Check Cython formatting with cython-lint
run: |
cython-lint --max-line-length=99 --ignore=E741 .
cython-lint .
- name: Check import order with isort
run: |
isort --profile=black --line-length=99 --check .
isort --profile=black --check .
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics || exit 1
flake8 . --count --exit-zero --max-line-length=99 --statistics
flake8 . --count --select=E9,F7,F63,F82 --show-source --statistics || exit 1
flake8 . --count --exit-zero --statistics
- name: Test with pytest
run: |
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ requires = [

[tool.black]
line-length = 99
target_version = ["py38", "py39", "py310", "py311", "py312"]
preview = true
target_version = ["py38", "py39", "py310", "py311", "py312"]

[tool.cython-lint]
max-line-length = 99
ignore = ["E741"]
max-line-length = 99

[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
include_trailing_comma = true
line_length = 99
multi_line_output = 3
use_parentheses = true
2 changes: 1 addition & 1 deletion quantile_forest/_quantile_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ def fit(self, X, y, sample_weight=None, sparse_pickle=False):

return self

@staticmethod
def _map_indices_to_leaves(
self,
bootstrap_indices,
X_leaves_bootstrap,
sample_weight,
Expand Down
12 changes: 6 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ include = quantile_forest*
test = pytest

[tool:pytest]
testpaths = quantile_forest
addopts =
--doctest-modules
--disable-pytest-warnings
--color=yes
--disable-pytest-warnings
--doctest-modules
testpaths = quantile_forest

[flake8]
max-line-length = 99
ignore = E203, E266, E402, E501, W503, E731
select = B,C,E,F,W,T4,B9
exclude =
.git,
build,
__pycache__
ignore = E203, E402, E731, W503
max-line-length = 99
select = B, B9, C, E, F, T4, W

[metadata]
description_file = README.md
Expand Down

0 comments on commit 03d238c

Please sign in to comment.