pybind11/include/pybind11
Tim Ohliger 1b7aa0bb66
feat: rework of arg/return type hints to support .noconvert() (#5486)
* Added rework of arg/return typing

* Changed `Path` to `pathlib.Path` for compatibility with pybind11-stubgen

* Removed old arg/return type hint implementation

* Added noconvert support for arg/return type hints

* Added commented failing tests for Literals with special characters

* Added return_descr/arg_descr for correct typing in typing::Callable

* Fixed clang-tidy issues

* Changed io_name to have explicit return type (for C++11 support)

* style: pre-commit fixes

* Added support for nested callables

* Fixed missing include

* Fixed is_return_value constructor call

* Fixed clang-tidy issue

* Uncommented test cases for special characters in literals

* Moved literal tests to correct test case

* Added escaping of special characters in typing::Literal

* Readded mistakenly deleted bracket

* Moved sanitize_string_literal to correct namespace

* Added test for Literal with `!` and changed StringLiteral template param name

* Added test for Literal with multiple and repeated special chars

* Simplified string literal sanitization function

* Added test for `->` in literal

* Added test for `->` with io_name

* Removed unused parameter name to prevent warning

* Added escaping of `-` in literal to prevent processing of `->`

* Fixed wrong computation of sanitized string literal length

* Added cast to prevent error with MSVC

* Simplified special character check

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-24 17:01:06 -05:00
..
conduit PYBIND11_PLATFORM_ABI_ID Modernization Continued (platforms other than MSVC) (#5439) 2024-12-20 01:39:32 -08:00
detail feat: rework of arg/return type hints to support .noconvert() (#5486) 2025-01-24 17:01:06 -05:00
eigen chore(deps): update pre-commit hooks (#5432) 2024-11-06 11:19:25 -08:00
stl feat: rework of arg/return type hints to support .noconvert() (#5486) 2025-01-24 17:01:06 -05:00
attr.h Elide to-python conversion of setter return values (#4621) 2023-05-08 10:13:54 -07:00
buffer_info.h chore(deps): update pre-commit hooks (#5084) 2024-04-02 11:14:08 -04:00
cast.h feat: rework of arg/return type hints to support .noconvert() (#5486) 2025-01-24 17:01:06 -05:00
chrono.h chore: drop Python 3.5 (#3719) 2022-02-11 19:06:16 -05:00
common.h Add a dummy common.h header with a deprecation warning 2017-09-06 15:22:26 +02:00
complex.h Fully-automatic clang-format with include reordering (#3713) 2022-02-10 12:17:07 -08:00
eigen.h First draft of Eigen::Tensor support (#4201) 2022-10-18 16:54:16 -07:00
embed.h feat: remove Python 3.7 support (#5191) 2024-07-30 09:18:35 -07:00
eval.h Add support for GraalPy (#5380) 2024-10-07 14:12:04 -07:00
functional.h Add type_caster_std_function_specializations feature. (#4597) 2024-08-09 13:28:12 -07:00
gil_safe_call_once.h docs/advanced A document about deadlock potential with C++ statics (#5394) 2024-10-08 10:51:20 -07:00
gil.h feat: remove Python 3.7 support (#5191) 2024-07-30 09:18:35 -07:00
iostream.h chore: add err guard to capsule destructor and add a move to iostream (#3958) 2022-05-27 14:32:57 -04:00
numpy.h Add dtype::normalized_num and dtype::num_of (#5429) 2024-11-17 07:56:02 -08:00
operators.h Reproducer and fix for issue encountered in smart_holder update. (#4228) 2022-10-09 21:50:35 -07:00
options.h Add option for enable/disable enum members in docstring. (#2768) 2022-12-08 23:10:10 -08:00
pybind11.h feat: rework of arg/return type hints to support .noconvert() (#5486) 2025-01-24 17:01:06 -05:00
pytypes.h feat(types) Allow setting types for attributes (#5460) 2024-12-21 16:22:08 -08:00
stl_bind.h Print key in KeyError in map.__getitem__/__delitem__ (#5397) 2024-10-08 10:49:35 -07:00
stl.h Backport of https://github.com/google/pywrapcc/pull/30034 (#5305) 2024-08-14 22:30:29 -07:00
type_caster_pyobject_ptr.h Add type_caster<PyObject> (#4601) 2023-05-07 10:15:53 -07:00
typing.h feat: rework of arg/return type hints to support .noconvert() (#5486) 2025-01-24 17:01:06 -05:00
warnings.h Warnings wrappers to use from C++ (#5291) 2024-08-28 20:55:50 -07:00