diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d34f39752..486b5e94fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: exclude: ^source/3rdparty - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.6.7 + rev: v0.6.8 hooks: - id: ruff args: ["--fix"] @@ -52,10 +52,10 @@ repos: - id: blacken-docs # C++ - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v18.1.8 + rev: v19.1.0 hooks: - id: clang-format - exclude: ^source/3rdparty|source/lib/src/gpu/cudart/.+\.inc + exclude: ^(source/3rdparty|source/lib/src/gpu/cudart/.+\.inc|.+\.ipynb$) # markdown, yaml, CSS, javascript - repo: https://github.com/pre-commit/mirrors-prettier rev: v4.0.0-alpha.8 @@ -146,7 +146,7 @@ repos: exclude: .pre-commit-config.yaml|source/lmp # customized pylint rules - repo: https://github.com/pylint-dev/pylint/ - rev: v3.3.0 + rev: v3.3.1 hooks: - id: pylint entry: env PYTHONPATH=source/checker pylint diff --git a/source/lib/include/gpu_cuda.h b/source/lib/include/gpu_cuda.h index fb467674cb..9504a95b7a 100644 --- a/source/lib/include/gpu_cuda.h +++ b/source/lib/include/gpu_cuda.h @@ -18,8 +18,10 @@ #define gpuMemset cudaMemset #define GPU_MAX_NBOR_SIZE 4096 -#define DPErrcheck(res) \ - { DPAssert((res), __FILE__, __LINE__); } +#define DPErrcheck(res) \ + { \ + DPAssert((res), __FILE__, __LINE__); \ + } inline void DPAssert(cudaError_t code, const char *file, int line, @@ -54,8 +56,10 @@ inline void DPAssert(cudaError_t code, } } -#define nborErrcheck(res) \ - { nborAssert((res), __FILE__, __LINE__); } +#define nborErrcheck(res) \ + { \ + nborAssert((res), __FILE__, __LINE__); \ + } inline void nborAssert(cudaError_t code, const char *file, int line, diff --git a/source/lib/include/gpu_rocm.h b/source/lib/include/gpu_rocm.h index fbd5e1ce3f..abb7ddfa62 100644 --- a/source/lib/include/gpu_rocm.h +++ b/source/lib/include/gpu_rocm.h @@ -20,8 +20,10 @@ #define gpuMemcpyDeviceToDevice hipMemcpyDeviceToDevice #define gpuMemset hipMemset -#define DPErrcheck(res) \ - { DPAssert((res), __FILE__, __LINE__); } +#define DPErrcheck(res) \ + { \ + DPAssert((res), __FILE__, __LINE__); \ + } inline void DPAssert(hipError_t code, const char *file, int line, @@ -39,8 +41,10 @@ inline void DPAssert(hipError_t code, } } -#define nborErrcheck(res) \ - { nborAssert((res), __FILE__, __LINE__); } +#define nborErrcheck(res) \ + { \ + nborAssert((res), __FILE__, __LINE__); \ + } inline void nborAssert(hipError_t code, const char *file, int line,