We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7b916e commit 728877aCopy full SHA for 728877a
pybind11_stubgen/__init__.py
@@ -249,6 +249,11 @@ def stub_parser_from_args(args: CLIArgs) -> IParser:
249
),
250
]
251
252
+ if args.print_invalid_expressions_as_is:
253
+ wrap_invalid_expressions = []
254
+ else:
255
+ wrap_invalid_expressions = [WrapInvalidExpressionInAnnotated]
256
+
257
class Parser(
258
*error_handlers_top, # type: ignore[misc]
259
FixMissing__future__AnnotationsImport,
@@ -263,7 +268,7 @@ class Parser(
263
268
FixMissingEnumMembersAnnotation,
264
269
OverridePrintSafeValues,
265
270
*numpy_fixes, # type: ignore[misc]
266
- WrapInvalidExpressionInAnnotated,
271
+ *wrap_invalid_expressions,
267
272
FixNumpyDtype,
273
FixNumpyArrayFlags,
274
FixCurrentModulePrefixInTypeNames,
0 commit comments