diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5e756e..06be937 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: test: if: github.event_name != 'pull_request' || !contains('OWNER,MEMBER,COLLABORATOR', github.event.pull_request.author_association) name: py${{ matrix.python }} - runs-on: ubuntu-latest + runs-on: ubuntu-${{ matrix.python == 3.7 && '22.04' || 'latest' }} strategy: matrix: python: [3.7, 3.12] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3269a76..85a4d83 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -27,7 +27,7 @@ repos: types: [text] exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$ - repo: https://github.com/PyCQA/flake8 - rev: 7.1.0 + rev: 7.1.1 hooks: - id: flake8 args: [-j8] @@ -40,18 +40,18 @@ repos: - flake8-pyproject - flake8-string-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.0 + rev: v1.14.1 hooks: - id: mypy additional_dependencies: [types-setuptools] - repo: https://github.com/google/yapf - rev: v0.40.2 + rev: v0.43.0 hooks: - id: yapf args: [-i] additional_dependencies: [toml] - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + rev: 6.0.0 hooks: - id: isort - repo: https://github.com/doublify/pre-commit-clang-format diff --git a/cuvec/include/cuvec.cuh b/cuvec/include/cuvec.cuh index 9b69804..1de2ec1 100644 --- a/cuvec/include/cuvec.cuh +++ b/cuvec/include/cuvec.cuh @@ -38,9 +38,7 @@ template struct CuAlloc { #if __cplusplus > 201703L [[nodiscard]] #endif - T - * - allocate(std::size_t n) { + T *allocate(std::size_t n) { if (n > std::numeric_limits::max() / sizeof(T)) throw std::bad_alloc(); T *p; diff --git a/pyproject.toml b/pyproject.toml index d9dff35..fcd9cc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools_scm>=7", "scikit-build-core[pyproject]>=0.5", "swig>=4", "pybind11"] +requires = ["setuptools_scm>=7", "scikit-build-core[pyproject]>=0.5", "swig>=4,!=4.3", "pybind11"] build-backend = "scikit_build_core.build" [tool.scikit-build]