Skip to content

Commit 40c2b7e

Browse files
Fixed custom_stubgen.py
1 parent 823b57d commit 40c2b7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

custom_stubgen.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
import logging
33
from pathlib import Path
4-
from typing import Dict, Optional, Sequence
4+
from typing import Dict, Optional, Iterable
55
from collections import defaultdict
66

77
from pybind11_stubgen import Writer, QualifiedName, Printer, arg_parser, stub_parser_from_args, to_output_and_subdir, \
@@ -10,7 +10,7 @@
1010

1111

1212
class CustomWriter(Writer):
13-
def __init__(self, alternative_types: Dict[str, Sequence[str, ...]], stub_ext: str = "pyi"):
13+
def __init__(self, alternative_types: Dict[str, Iterable[str]], stub_ext: str = "pyi"):
1414
super().__init__(stub_ext=stub_ext)
1515
self.alternative_types = {
1616
QualifiedName.from_str(k): tuple(QualifiedName.from_str(e) for e in v) for k, v in alternative_types.items()
@@ -72,5 +72,5 @@ def write_module(self, module: Module, printer: Printer, to: Path, sub_dir: Opti
7272
out_dir,
7373
sub_dir=sub_dir,
7474
dry_run=args.dry_run,
75-
writer=CustomWriter(IMPLICIT_CONVERSIONS, stub_ext=args.stub_extension),
75+
writer=CustomWriter(alternatives, stub_ext=args.stub_extension),
7676
)

0 commit comments

Comments
 (0)