File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -307,8 +307,7 @@ def next(self) -> set[str]:
307307 self ._gen_charset = True
308308
309309 if self ._gen_charset :
310- _ : set [str ] = self ._next_charset ()
311- # Optimization: use the new charset to calculate the next set of strings
310+ self ._next_charset ()
312311 result : set [str ] = self ._calculate_using_new_charset ()
313312 else :
314313 if not self ._done_repetition :
@@ -341,7 +340,7 @@ def _calculate(self) -> set[str]:
341340
342341 return result
343342
344- def _next_charset (self ) -> set [ str ] :
343+ def _next_charset (self ) -> None :
345344 assert not self ._done_charset
346345
347346 index_charset = self ._index_charset + 1
@@ -355,9 +354,7 @@ def _next_charset(self) -> set[str]:
355354 self ._index_charset = index_charset
356355 new_chars = self ._alternatives [index_charset ].next ()
357356 self ._done_charset = all (alt .done for alt in self ._alternatives )
358- new_chars -= self ._current_chars
359357 self ._current_chars .update (new_chars )
360- return new_chars
361358
362359 def _calculate_chars (self ) -> set [str ]:
363360 result = set ()
Original file line number Diff line number Diff line change 55
66setup (
77 name = 'regex_enumerator' ,
8- version = '0.9.2 ' ,
8+ version = '0.9.3 ' ,
99 packages = find_packages (include = ['regex_enumerator' , 'regex_enumerator.*' ]),
1010 description = 'Enumerate all strings that match a given regex' ,
1111 author = 'Vincenzo Greco' ,
You can’t perform that action at this time.
0 commit comments