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 10d13a8 commit de43fe5Copy full SHA for de43fe5
detect_secrets/plugins/base.py
@@ -165,13 +165,8 @@ def denylist(self) -> Iterable[Pattern]:
165
166
def analyze_string(self, string: str) -> Generator[str, None, None]:
167
for regex in self.denylist:
168
- for match in regex.findall(string):
169
- if isinstance(match, tuple):
170
- for submatch in filter(bool, match):
171
- # It might make sense to paste break after yielding
172
- yield submatch
173
- else:
174
- yield match
+ for match in regex.finditer(string):
+ yield match.group(0) # Returns the entire matched string
175
176
@staticmethod
177
def build_assignment_regex(
0 commit comments