mirror of
https://github.com/mpusz/mp-units.git
synced 2025-06-24 16:51:33 +02:00
style: pre-commit rules updated
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
default_stages: [commit]
|
default_stages: [pre-commit]
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: meta
|
- repo: meta
|
||||||
@ -6,12 +6,12 @@ repos:
|
|||||||
- id: check-hooks-apply
|
- id: check-hooks-apply
|
||||||
- id: check-useless-excludes
|
- id: check-useless-excludes
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.3.0
|
rev: v5.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
rev: v19.1.2
|
rev: v19.1.5
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
||||||
@ -23,17 +23,17 @@ repos:
|
|||||||
# additional_dependencies: ["cmakelang"]
|
# additional_dependencies: ["cmakelang"]
|
||||||
# exclude: "cmake/.*"
|
# exclude: "cmake/.*"
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.10.0
|
rev: 24.10.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
language_version: python3
|
language_version: python3
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
rev: 5.12.0
|
rev: 5.13.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
args: [--profile, black, --multi-line, "3"]
|
args: [--profile, black, --multi-line, "3"]
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 5.0.4
|
rev: 7.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
|
|
||||||
|
12
conanfile.py
12
conanfile.py
@ -252,9 +252,9 @@ class MPUnitsConan(ConanFile):
|
|||||||
tc.absolute_paths = True # only needed for CMake CI
|
tc.absolute_paths = True # only needed for CMake CI
|
||||||
if self._build_all:
|
if self._build_all:
|
||||||
tc.cache_variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = True
|
tc.cache_variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = True
|
||||||
tc.cache_variables[
|
tc.cache_variables["CMAKE_VERIFY_INTERFACE_HEADER_SETS"] = (
|
||||||
"CMAKE_VERIFY_INTERFACE_HEADER_SETS"
|
not opt.import_std
|
||||||
] = not opt.import_std
|
)
|
||||||
tc.cache_variables["MP_UNITS_DEV_BUILD_LA"] = not self._skip_la
|
tc.cache_variables["MP_UNITS_DEV_BUILD_LA"] = not self._skip_la
|
||||||
if self._run_clang_tidy:
|
if self._run_clang_tidy:
|
||||||
tc.cache_variables["MP_UNITS_DEV_CLANG_TIDY"] = True
|
tc.cache_variables["MP_UNITS_DEV_CLANG_TIDY"] = True
|
||||||
@ -264,9 +264,9 @@ class MPUnitsConan(ConanFile):
|
|||||||
if opt.import_std:
|
if opt.import_std:
|
||||||
tc.cache_variables["CMAKE_CXX_MODULE_STD"] = True
|
tc.cache_variables["CMAKE_CXX_MODULE_STD"] = True
|
||||||
# Current experimental support according to `Help/dev/experimental.rst`
|
# Current experimental support according to `Help/dev/experimental.rst`
|
||||||
tc.cache_variables[
|
tc.cache_variables["CMAKE_EXPERIMENTAL_CXX_IMPORT_STD"] = (
|
||||||
"CMAKE_EXPERIMENTAL_CXX_IMPORT_STD"
|
"0e5b6991-d74f-4b3d-a41c-cf096e0b2508"
|
||||||
] = "0e5b6991-d74f-4b3d-a41c-cf096e0b2508"
|
)
|
||||||
|
|
||||||
# TODO remove the below when Conan will learn to handle C++ modules
|
# TODO remove the below when Conan will learn to handle C++ modules
|
||||||
if opt.freestanding:
|
if opt.freestanding:
|
||||||
|
@ -46,9 +46,9 @@ class TestPackageConan(ConanFile):
|
|||||||
if opt.import_std:
|
if opt.import_std:
|
||||||
tc.cache_variables["CMAKE_CXX_MODULE_STD"] = True
|
tc.cache_variables["CMAKE_CXX_MODULE_STD"] = True
|
||||||
# Current experimental support according to `Help/dev/experimental.rst`
|
# Current experimental support according to `Help/dev/experimental.rst`
|
||||||
tc.cache_variables[
|
tc.cache_variables["CMAKE_EXPERIMENTAL_CXX_IMPORT_STD"] = (
|
||||||
"CMAKE_EXPERIMENTAL_CXX_IMPORT_STD"
|
"0e5b6991-d74f-4b3d-a41c-cf096e0b2508"
|
||||||
] = "0e5b6991-d74f-4b3d-a41c-cf096e0b2508"
|
)
|
||||||
# TODO remove the below when Conan will learn to handle C++ modules
|
# TODO remove the below when Conan will learn to handle C++ modules
|
||||||
if opt.cxx_modules:
|
if opt.cxx_modules:
|
||||||
if opt.freestanding:
|
if opt.freestanding:
|
||||||
|
Reference in New Issue
Block a user