Skip to content

Commit

Permalink
fix: regex lists to regex tuples
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyrla committed Dec 4, 2021
1 parent d4ffa5b commit b5088ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pre_commit/clientlib.py
Expand Up @@ -144,7 +144,7 @@ def check(self, dct: Dict[str, Any]) -> None:
f"regex, not a glob -- matching '/*' probably isn't what you "
f'want here',
)
for fwd_slash_re in [r'[\\/]', r'[\/]', r'[/\\]']:
for fwd_slash_re in (r'[\\/]', r'[\/]', r'[/\\]'):
if fwd_slash_re in dct.get(self.key, ''):
logger.warning(
fr'pre-commit normalizes slashes in the {self.key!r} '
Expand All @@ -162,7 +162,7 @@ def check(self, dct: Dict[str, Any]) -> None:
f'The top-level {self.key!r} field is a regex, not a glob -- '
f"matching '/*' probably isn't what you want here",
)
for fwd_slash_re in [r'[\\/]', r'[\/]', r'[/\\]']:
for fwd_slash_re in (r'[\\/]', r'[\/]', r'[/\\]'):
if fwd_slash_re in dct.get(self.key, ''):
logger.warning(
fr'pre-commit normalizes the slashes in the top-level '
Expand Down

0 comments on commit b5088ce

Please sign in to comment.