mirror of https://github.com/pybind/pybind11
Branch:
master
archive/smart_holder
array-sequence-fix
cpp17-aligned-new
fold-expression-caster
henryiii-patch-1
henryiii-patch-2
henryiii/revert/pycapsule
internals_ptr
issue1561_fix
master
pre-commit-ci-update-config
revert-4220-fix-nvcc-11.4-11.8
stable
undefined-macos
v1.8
v2.0
v2.1
v2.10
v2.11
v2.12
v2.13
v2.2
v2.3
v2.4
v2.5
v2.6
v2.7
v2.8
v2.9
void-caster-fix
archive/llvm_sanitizer_mods
archive/pr2198_list_caster_bytes_uint8
archive/pr2409_2020_10_18_two_defines
archive/pr2672_sideline_cast_shtc_interleaved
archive/pr2672_sideline_cast_shtc_interleaved_openspiel_pattern
archive/pr2672_test_unique_ptr_member
archive/pr2672_use_smart_holder_as_default_v1
archive/pr2687_move_holder_test_premature_delete
archive/xxx_value_ptr_xxx_holder
archive/yclass_v0
milestones_reached/pr2672_as_deployed_with_cl_358092606
v1.0
v1.1
v1.2
v1.3
v1.4
v1.5
v1.6
v1.7
v1.8
v1.8.1
v2.0.0
v2.0.0-rc1
v2.0.1
v2.1.0
v2.1.1
v2.10.0
v2.10.1
v2.10.2
v2.10.3
v2.10.4
v2.11.0
v2.11.1
v2.11.2
v2.12.0
v2.12.1
v2.13.0
v2.13.1
v2.13.2
v2.13.3
v2.13.4
v2.13.5
v2.13.6
v2.2.0
v2.2.1
v2.2.2
v2.2.3
v2.2.4
v2.3.0
v2.4.0
v2.4.1
v2.4.2
v2.4.3
v2.5.0
v2.6.0
v2.6.0b1
v2.6.0rc1
v2.6.0rc2
v2.6.0rc3
v2.6.1
v2.6.2
v2.7.0
v2.7.1
v2.8.0
v2.8.1
v2.9.0
v2.9.1
v2.9.2
v3.0.0rc1
v3.0.0rc2
v3.0.0rc3
v3.0.0rc4
${ noResults }
2 Commits (master)
Author | SHA1 | Message | Date |
---|---|---|---|
|
67424358f4
|
fix(types): add typing and collections.abc module prefix (#5663)
* Fix Python 3.8 type hints and add module prefix These type hints are invalid in Python 3.8. Add `typing.` prefix to remove ambiguity. * style: pre-commit fixes * Add module prefix to Union * Rename macros * Improve comment * Comment out 3.8 type hint macros Fixing this issue in Python 3.8 will require updating lots of tests. This can be added in a further pull request. * Add Iterable module prefix * Add module prefix to Iterator * Add module prefix to Callable * Re-add accidentally deleted brackets * Add module prefix to Optional * Add module prefix to Final * Add module prefix to ClassVar * Add module prefix to TypeGuard * Add module prefix to TypeIs * Add module prefix to NoReturn * Add module prefix to Never * Add module prefix to Literal * Add module prefix to Callable * Add module prefix to Sequence * Add module prefix to Iterator * style: pre-commit fixes * Remove type hint macros * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> |
2 months ago |
|
1d09fc8300
|
Option for arg/return type hints and correct typing for std::filesystem::path (#5450)
* Added arg/return type handling. * Added support for nested arg/return type in py::typing::List * Added support for arg/return type in stl/filesystem * Added tests for arg/return type in stl/filesystem and py::typing::List * Added arg/return name to more py::typing classes * Added arg/return type to Callable[...] * Added tests for typing container classes (also nested) * Changed typing classes to avoid using C++14 auto return type deduction. * Fixed clang-tidy errors. * Changed Enable to SFINAE * Added test for Tuple[T, ...] * Added RealNumber with custom caster for testing typing classes. * Added tests for Set, Iterable, Iterator, Union, and Optional * Added tests for Callable * Fixed Callable with ellipsis test * Changed TypeGuard/TypeIs to use return type (being the narrower type) + Tests * Added test for use of fallback type name with stl vector * Updated documentation. * Fixed unnecessary constructor call in test. * Fixed reference counting in example type caster. * Fixed clang-tidy issues. * Fix for clang-tidy * Updated cast method to use pybind11 API rather than Python C API in custom caster example * Updated load to use pybind11 API rather than Python C API in custom caster example * Changed test of arg/return name to use pybind11 API instead of Python C API * Updated code in adcanced/cast example and improved documentation text * Fixed references in custom type caster docs * Fixed wrong logical and operator in test * Fixed wrong logical operator in doc example * Added comment to test about `float` vs `float | int` * Updated std::filesystem::path docs in cast/overview section * Remove one stray dot. --------- Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com> |
7 months ago |