- 31 Dec, 2020 1 commit
-
-
Eric Cousineau authored
* enum: Add Enum.value property * simplify * address review
-
- 19 Dec, 2020 1 commit
-
-
Ralf W. Grosse-Kunstleve authored
* minor cleanup: fixing or silencing flake8 errors * ci: lock CMake to non-Universal version * Update .github/workflows/ci.yml Co-authored-by:Henry Schreiner <HenrySchreinerIII@gmail.com>
-
- 10 Nov, 2020 1 commit
-
-
Yannick Jadoul authored
* Add argument names to enum_ methods * Add test_enum::test_docstring_signatures
-
- 16 Oct, 2020 1 commit
-
-
Henry Schreiner authored
* style: use Black everywhere * style: minor touchup from review
-
- 19 Sep, 2020 1 commit
-
-
David Vo authored
This changes enum reprs to look like `<Enum.name: value>` similarly to the Python enum module. This keeps the str of enums as `Enum.name`, like the Python enum module.
-
- 20 Jul, 2020 1 commit
-
-
Henry Schreiner authored
-
- 20 Sep, 2019 2 commits
-
-
Wenzel Jakob authored
-
Wenzel Jakob authored
-
- 19 Sep, 2019 1 commit
-
-
Sergei Izmailov authored
* fix: Avoid conversion to `int_` rhs argument of enum eq/ne * test: compare unscoped enum with strings * suppress comparison to None warning * test unscoped enum arithmetic and comparision with unsupported type
-
- 04 Sep, 2019 1 commit
-
-
Lori A. Burns authored
-
- 24 Oct, 2018 1 commit
-
-
Tarcísio Fischer authored
-
- 11 Sep, 2018 2 commits
-
-
Wenzel Jakob authored
This commit addresses an inefficiency in how enums are created in pybind11. Most of the enum_<> implementation is completely generic -- however, being a template class, it ended up instantiating vast amounts of essentially identical code in larger projects with many enums. This commit introduces a generic non-templated helper class that is compatible with any kind of enumeration. enum_ then becomes a thin wrapper around this new class. The new enum_<> API is designed to be 100% compatible with the old one.
-
Krzysztof Fornalczyk authored
* check for already existing enum value added; added test * added enum value name to exception message * test for defining enum with multiple identical names moved to test_enum.cpp/py
-
- 07 Apr, 2018 1 commit
-
-
Boris Staletic authored
The property returns the enum_ value as a string. For example: >>> import module >>> module.enum.VALUE enum.VALUE >>> str(module.enum.VALUE) 'enum.VALUE' >>> module.enum.VALUE.name 'VALUE' This is actually the equivalent of Boost.Python "name" property.
-
- 16 Nov, 2017 1 commit
-
-
Wenzel Jakob authored
-
- 05 Aug, 2017 1 commit
-
-
Jason Rhinelander authored
This udpates all the remaining tests to the new test suite code and comment styles started in #898. For the most part, the test coverage here is unchanged, with a few minor exceptions as noted below. - test_constants_and_functions: this adds more overload tests with overloads with different number of arguments for more comprehensive overload_cast testing. The test style conversion broke the overload tests under MSVC 2015, prompting the additional tests while looking for a workaround. - test_eigen: this dropped the unused functions `get_cm_corners` and `get_cm_corners_const`--these same tests were duplicates of the same things provided (and used) via ReturnTester methods. - test_opaque_types: this test had a hidden dependence on ExampleMandA which is now fixed by using the global UserType which suffices for the relevant test. - test_methods_and_attributes: this required some additions to UserType to make it usable as a replacement for th...
-
- 29 Apr, 2017 2 commits
-
-
Wenzel Jakob authored
The added flag enables non-buffered console output when using Ninja
-
Wenzel Jakob authored
Enumerations on Python 2.7 were not always implicitly converted to integers (depending on the target size). This patch adds a __long__ conversion function (only enabled on 2.7) which fixes this issue. The attached test case fails without this patch.
-
- 03 Mar, 2017 1 commit
-
-
Matthieu Bec authored
-
- 20 Nov, 2016 1 commit
-
-
Dean Moldovan authored
A flake8 configuration is included in setup.cfg and the checks are executed automatically on Travis: * Ensures a consistent PEP8 code style * Does basic linting to prevent possible bugs
-
- 16 Nov, 2016 1 commit
-
-
Pim Schellart authored
* Allow enums to be ordered * Support binary operators
-
- 19 Aug, 2016 1 commit
-
-
Dean Moldovan authored
There are more enum tests than 'constants and functions'.
-