Skip to content

Commit 8272b12

Browse files
committed
Fix type hint for Generator
1 parent 51a3c34 commit 8272b12

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/cucumber_expressions/regular_expression.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import re
22
from collections.abc import Generator
3-
from typing import Optional, Union, Tuple, List
3+
from typing import Optional, Union, List
44

55
from cucumber_expressions.argument import Argument
66
from cucumber_expressions.parameter_type import ParameterType
@@ -65,9 +65,7 @@ def _process_capture_group(self, group_source: str):
6565
# No named group, just return the original pattern
6666
return None, group_source
6767

68-
def generate_parameter_types(
69-
self, text
70-
) -> Generator[Tuple[ParameterType, Optional[str]]]:
68+
def generate_parameter_types(self, text) -> Generator:
7169
for group_builder in self.tree_regexp.group_builder.children:
7270
# Extract the raw source for the group
7371
parameter_type_regexp = group_builder.source

0 commit comments

Comments
 (0)