-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
15d9dae
commit 1b7aa0b
Showing
10 changed files
with
230 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.