Commit 183059f
feat(types): add support for typing.Literal type (#5192)
* typevar prototype
* style: pre-commit fixes
* change to NameT
* style: pre-commit fixes
* make string const
* add missing closing bracket
* style: pre-commit fixes
* clean up handle_type_name
* style: pre-commit fixes
* add back missing <
* style: pre-commit fixes
* add back NameT
* try fixed_string
* style: pre-commit fixes
* std::basic_fixed_string
* test c++20
* style: pre-commit fixes
* cleanup
* fix object to typevar conversion
* style: pre-commit fixes
* And CPP20 checks
* style: pre-commit fixes
* add missing cpp20++ check
* style: pre-commit fixes
* Add C++20 check to python
* Fix python if {
* style: pre-commit fixes
* update test name
* style: pre-commit fixes
* remove call on cpp_std
* make field const
* test nontype_template
* update feature check
* update name of guard
* fix try except in test
* fix pre commit
* remove extra semi colon
* except AttributeError
* fix try except in test
* remove const
* Clean up tests
* style: pre-commit fixes
* start string literal
* start int literal
* func declare
* commit clean
* use contextlib.suppres
* resolve stash
* more literal type
* fix annotation name
* stash
* request changes
* lint
* Add comments
* style: pre-commit fixes
* Add support for unions and optionals to be compatible with object
* lint
* remove comment
* Create Literal Type implementation
* clean up
* Update comment
* remove incorrect comment
* rerun CI
* rerun CI
* fix extra line
* lint
* move if defined block
* style: pre-commit fixes
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent aebcd70 commit 183059f
File tree
3 files changed
+44
-3
lines changed- include/pybind11
- tests
3 files changed
+44
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
175 | 186 | | |
176 | 187 | | |
177 | | - | |
| 188 | + | |
178 | 189 | | |
179 | 190 | | |
180 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
113 | 126 | | |
114 | 127 | | |
115 | 128 | | |
| |||
851 | 864 | | |
852 | 865 | | |
853 | 866 | | |
| 867 | + | |
854 | 868 | | |
855 | 869 | | |
856 | 870 | | |
| |||
881 | 895 | | |
882 | 896 | | |
883 | 897 | | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
884 | 903 | | |
885 | 904 | | |
886 | 905 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
1001 | 1012 | | |
1002 | 1013 | | |
1003 | 1014 | | |
| |||
0 commit comments