mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-30 00:47:12 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
a51ee57b7c
15
.github/labeler.yml
vendored
15
.github/labeler.yml
vendored
@ -1,8 +1,13 @@
|
|||||||
docs:
|
docs:
|
||||||
- any:
|
all:
|
||||||
- 'docs/**/*.rst'
|
- changed-files:
|
||||||
- '!docs/changelog.rst'
|
- all-globs-to-all-files:
|
||||||
- '!docs/upgrade.rst'
|
- '!docs/changelog.rst'
|
||||||
|
- '!docs/upgrade.rst'
|
||||||
|
- base-branch: "^(?!dependabot).*"
|
||||||
|
- base-branch: "^(?!pre-commit-ci).*"
|
||||||
|
|
||||||
ci:
|
ci:
|
||||||
- '.github/workflows/*.yml'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- '.github/workflows/*.yml'
|
||||||
|
9
.github/labeler_merged.yml
vendored
9
.github/labeler_merged.yml
vendored
@ -1,3 +1,8 @@
|
|||||||
|
# Add 'needs changelog` label to any change to code files as long as the `CHANGELOG` hasn't changed
|
||||||
|
# Skip dependabot and pre-commit-ci PRs
|
||||||
needs changelog:
|
needs changelog:
|
||||||
- all:
|
- all:
|
||||||
- '!docs/changelog.rst'
|
- changed-files:
|
||||||
|
- all-globs-to-all-files: "!docs/changelog.rst"
|
||||||
|
- base-branch: "^(?!dependabot).*"
|
||||||
|
- base-branch: "^(?!pre-commit-ci).*"
|
||||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -972,7 +972,6 @@ jobs:
|
|||||||
mingw-w64-${{matrix.env}}-cmake
|
mingw-w64-${{matrix.env}}-cmake
|
||||||
mingw-w64-${{matrix.env}}-make
|
mingw-w64-${{matrix.env}}-make
|
||||||
mingw-w64-${{matrix.env}}-python-pytest
|
mingw-w64-${{matrix.env}}-python-pytest
|
||||||
mingw-w64-${{matrix.env}}-eigen3
|
|
||||||
mingw-w64-${{matrix.env}}-boost
|
mingw-w64-${{matrix.env}}-boost
|
||||||
mingw-w64-${{matrix.env}}-catch
|
mingw-w64-${{matrix.env}}-catch
|
||||||
|
|
||||||
@ -983,6 +982,7 @@ jobs:
|
|||||||
install: >-
|
install: >-
|
||||||
git
|
git
|
||||||
mingw-w64-${{matrix.env}}-python-scipy
|
mingw-w64-${{matrix.env}}-python-scipy
|
||||||
|
mingw-w64-${{matrix.env}}-eigen3
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
2
.github/workflows/labeler.yml
vendored
2
.github/workflows/labeler.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/labeler@v4
|
- uses: actions/labeler@v5
|
||||||
if: >
|
if: >
|
||||||
github.event.pull_request.merged == true &&
|
github.event.pull_request.merged == true &&
|
||||||
!startsWith(github.event.pull_request.title, 'chore(deps):') &&
|
!startsWith(github.event.pull_request.title, 'chore(deps):') &&
|
||||||
|
@ -25,14 +25,14 @@ repos:
|
|||||||
|
|
||||||
# Clang format the codebase automatically
|
# Clang format the codebase automatically
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
rev: "v18.1.2"
|
rev: "v18.1.4"
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
types_or: [c++, c, cuda]
|
types_or: [c++, c, cuda]
|
||||||
|
|
||||||
# Ruff, the Python auto-correcting linter/formatter written in Rust
|
# Ruff, the Python auto-correcting linter/formatter written in Rust
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.3.5
|
rev: v0.4.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: ["--fix", "--show-fixes"]
|
args: ["--fix", "--show-fixes"]
|
||||||
@ -40,7 +40,7 @@ repos:
|
|||||||
|
|
||||||
# Check static types with mypy
|
# Check static types with mypy
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: "v1.9.0"
|
rev: "v1.10.0"
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
args: []
|
args: []
|
||||||
@ -62,7 +62,7 @@ repos:
|
|||||||
|
|
||||||
# Standard hooks
|
# Standard hooks
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: "v4.5.0"
|
rev: "v4.6.0"
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
@ -123,7 +123,7 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
exclude: ".supp$"
|
exclude: ".supp$"
|
||||||
args: ["-x.codespell-ignore-lines", "-Lccompiler"]
|
args: ["-x.codespell-ignore-lines", "-Lccompiler,intstruct"]
|
||||||
|
|
||||||
# Check for common shell mistakes
|
# Check for common shell mistakes
|
||||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
@ -148,7 +148,7 @@ repos:
|
|||||||
files: ^pybind11
|
files: ^pybind11
|
||||||
|
|
||||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||||
rev: 0.28.1
|
rev: 0.28.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-readthedocs
|
- id: check-readthedocs
|
||||||
- id: check-github-workflows
|
- id: check-github-workflows
|
||||||
|
@ -403,7 +403,7 @@ TEST_SUBMODULE(class_, m) {
|
|||||||
// [workaround(intel)] = default does not work here
|
// [workaround(intel)] = default does not work here
|
||||||
// Removing or defaulting this destructor results in linking errors with the Intel compiler
|
// Removing or defaulting this destructor results in linking errors with the Intel compiler
|
||||||
// (in Debug builds only, tested with icpc (ICC) 2021.1 Beta 20200827)
|
// (in Debug builds only, tested with icpc (ICC) 2021.1 Beta 20200827)
|
||||||
~PublicistB() override{}; // NOLINT(modernize-use-equals-default)
|
~PublicistB() override {}; // NOLINT(modernize-use-equals-default)
|
||||||
using ProtectedB::foo;
|
using ProtectedB::foo;
|
||||||
using ProtectedB::get_self;
|
using ProtectedB::get_self;
|
||||||
using ProtectedB::void_foo;
|
using ProtectedB::void_foo;
|
||||||
|
@ -348,7 +348,7 @@ TEST_SUBMODULE(numpy_dtypes, m) {
|
|||||||
// is not a POD type
|
// is not a POD type
|
||||||
struct NotPOD {
|
struct NotPOD {
|
||||||
std::string v;
|
std::string v;
|
||||||
NotPOD() : v("hi"){};
|
NotPOD() : v("hi") {};
|
||||||
};
|
};
|
||||||
PYBIND11_NUMPY_DTYPE(NotPOD, v);
|
PYBIND11_NUMPY_DTYPE(NotPOD, v);
|
||||||
#endif
|
#endif
|
||||||
|
@ -78,7 +78,7 @@ struct hash<TplCtorClass> {
|
|||||||
template <template <typename> class OptionalImpl, typename T>
|
template <template <typename> class OptionalImpl, typename T>
|
||||||
struct OptionalHolder {
|
struct OptionalHolder {
|
||||||
// NOLINTNEXTLINE(modernize-use-equals-default): breaks GCC 4.8
|
// NOLINTNEXTLINE(modernize-use-equals-default): breaks GCC 4.8
|
||||||
OptionalHolder(){};
|
OptionalHolder() {};
|
||||||
bool member_initialized() const { return member && member->initialized; }
|
bool member_initialized() const { return member && member->initialized; }
|
||||||
OptionalImpl<T> member = T{};
|
OptionalImpl<T> member = T{};
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@ namespace py = pybind11;
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
struct IntStruct {
|
struct IntStruct {
|
||||||
explicit IntStruct(int v) : value(v){};
|
explicit IntStruct(int v) : value(v) {};
|
||||||
~IntStruct() { value = -value; }
|
~IntStruct() { value = -value; }
|
||||||
IntStruct(const IntStruct &) = default;
|
IntStruct(const IntStruct &) = default;
|
||||||
IntStruct &operator=(const IntStruct &) = default;
|
IntStruct &operator=(const IntStruct &) = default;
|
||||||
|
Loading…
Reference in New Issue
Block a user