Skip to content

Commit b5088ce

Browse files
committed
fix: regex lists to regex tuples
1 parent d4ffa5b commit b5088ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pre_commit/clientlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def check(self, dct: Dict[str, Any]) -> None:
144144
f"regex, not a glob -- matching '/*' probably isn't what you "
145145
f'want here',
146146
)
147-
for fwd_slash_re in [r'[\\/]', r'[\/]', r'[/\\]']:
147+
for fwd_slash_re in (r'[\\/]', r'[\/]', r'[/\\]'):
148148
if fwd_slash_re in dct.get(self.key, ''):
149149
logger.warning(
150150
fr'pre-commit normalizes slashes in the {self.key!r} '
@@ -162,7 +162,7 @@ def check(self, dct: Dict[str, Any]) -> None:
162162
f'The top-level {self.key!r} field is a regex, not a glob -- '
163163
f"matching '/*' probably isn't what you want here",
164164
)
165-
for fwd_slash_re in [r'[\\/]', r'[\/]', r'[/\\]']:
165+
for fwd_slash_re in (r'[\\/]', r'[\/]', r'[/\\]'):
166166
if fwd_slash_re in dct.get(self.key, ''):
167167
logger.warning(
168168
fr'pre-commit normalizes the slashes in the top-level '

0 commit comments

Comments
 (0)