sizmailov / pybind11-stubgen

Generate stubs for python modules
Other
228 stars 45 forks source link

multiple --enum-class-locations #157

Closed wojdyr closed 10 months ago

wojdyr commented 10 months ago

How to specify multiple enum mappings? This works for me:

--enum-class-locations 'Ignore:gemmi.ContactSearch'

but when I add a second option:

--enum-class-locations 'Ignore:gemmi.ContactSearch' --enum-class-locations 'M.+:gemmi'

the first one stops working.

sizmailov commented 10 months ago

Thanks for catching this. It should be fixed now.

``` pybind11-stubgen \ --enum-class-locations='Ignore:gemmi.ContactSearch' \ --enum-class-locations='Asu|MapSetup|CoorFormat|AxisOrder|HydrogenChange:gemmi' \ --enum-class-locations='Style:gemmi.cif' \ gemmi ```

```text pybind11_stubgen - [ ERROR] In gemmi.Residue : Invalid expression '' pybind11_stubgen - [ ERROR] In gemmi.Scaling : Invalid expression '' pybind11_stubgen - [WARNING] Raw C++ types/values were found in signatures extracted from docstrings. Please check the corresponding sections of pybind11 documentation to avoid common mistakes in binding code: - https://pybind11.readthedocs.io/en/latest/advanced/misc.html#avoiding-cpp-types-in-docstrings - https://pybind11.readthedocs.io/en/latest/advanced/functions.html#default-arguments-revisited ```