diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index 047d448..0000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Black lint - -on: [push, pull_request] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: psf/black@stable - with: - options: "--check --verbose --diff" - src: "./src" diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml deleted file mode 100644 index 56335bf..0000000 --- a/.github/workflows/mypy.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Mypy type checks - -on: [push, pull_request] - -jobs: - mypy: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - python-version: [3.7, 3.8, 3.9, "3.10"] - include: - - python-version: 3.7 - extra-args: "--no-warn-unused-ignores" - steps: - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/checkout@v2 - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools_scm[toml] wheel setuptools - python -m pip install numpy pandas flake8 tox mypy - - name: Mypy - run: | - mypy --cache-dir .mypy_cache --install-types ${{ matrix.extra-args }} --non-interactive --strict --allow-untyped-calls --ignore-missing-imports --non-interactive ./src diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index bb15ba4..41deb6c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -1,13 +1,14 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Tests +name: Linting and Tests on: [push, pull_request] jobs: tests: + name: Tests runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -52,6 +53,7 @@ jobs: fail_ci_if_error: false mypy: + name: Mypy checks runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -63,10 +65,10 @@ jobs: extra-args: "--no-warn-unused-ignores" steps: - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install dependencies run: | python -m pip install --upgrade pip setuptools_scm[toml] wheel setuptools @@ -76,9 +78,10 @@ jobs: mypy --cache-dir .mypy_cache --install-types ${{ matrix.extra-args }} --non-interactive --strict --allow-untyped-calls --ignore-missing-imports --non-interactive ./src black: + name: Black checks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: psf/black@stable with: options: "--check --verbose --diff" diff --git a/src/scikits/bootstrap/bootstrap.py b/src/scikits/bootstrap/bootstrap.py index 33d2ad4..fc3b1b3 100644 --- a/src/scikits/bootstrap/bootstrap.py +++ b/src/scikits/bootstrap/bootstrap.py @@ -454,7 +454,9 @@ def ci( if nvals.ndim == 1: out = np.abs(statfunction(*tdata) - stat[nvals])[np.newaxis].T else: - out = np.abs(statfunction(*tdata) - stat[(nvals, np.indices(nvals.shape)[1:])]).T.squeeze() + out = np.abs( + statfunction(*tdata) - stat[(nvals, np.indices(nvals.shape)[1:])] + ).T.squeeze() else: raise ValueError("Output option {0} is not supported.".format(output))