Skip to content

Commit b8decd4

Browse files
authored
fix: Multiple enum locations (#158)
Fixes #157
1 parent 16521f8 commit b8decd4

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
Version 2.3 (Sep 27, 2023)
5+
--------------------------
6+
Changes:
7+
- 🐛 fix: Inconsistent `--enum-class-locations` behaviour (#158)
8+
9+
410
Version 2.2.2 (Sep 26, 2023)
511
--------------------------
612
Changes:
@@ -12,6 +18,7 @@ Version 2.2.1 (Sep 23, 2023)
1218
Changes:
1319
- 📝 Update `--print-invalid-expressions-as-is` description
1420

21+
1522
Version 2.2 (Sep 20, 2023)
1623
--------------------------
1724
Changes:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pybind11-stubgen [-h]
2828
[--ignore-invalid-identifiers REGEX]
2929
[--ignore-unresolved-names REGEX]
3030
[--ignore-all-errors]
31-
[--enum-class-locations [REGEX:LOC ...]]
31+
[--enum-class-locations REGEX:LOC]
3232
[--numpy-array-wrap-with-annotated|
3333
--numpy-array-remove-parameters]
3434
[--print-invalid-expressions-as-is]

pybind11_stubgen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ def regex_colon_path(regex_path: str) -> tuple[re.Pattern, str]:
121121
"--enum-class-locations",
122122
dest="enum_class_locations",
123123
metavar="REGEX:LOC",
124+
action="append",
124125
default=[],
125-
nargs="*",
126126
type=regex_colon_path,
127127
help="Locations of enum classes in "
128128
"<enum-class-name-regex>:<path-to-class> format. "

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
maintainer_email="[email protected]",
77
description="PEP 561 type stubs generator for pybind11 modules",
88
url="https://github.com/sizmailov/pybind11-stubgen",
9-
version="2.2.2",
9+
version="2.3",
1010
long_description=open("README.md").read(),
1111
long_description_content_type="text/markdown",
1212
license="BSD",

0 commit comments

Comments
 (0)