Skip to content

Commit 37162a5

Browse files
committed
Replaced regex with re in info plugin
1 parent 396c493 commit 37162a5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

material/plugins/info/plugin.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import logging
2424
import os
2525
import platform
26-
import regex
26+
import re
2727
import requests
2828
import site
2929
import sys
@@ -408,9 +408,8 @@ def _is_excluded(self, abspath: str) -> bool:
408408

409409
# Resolve the path into POSIX format to match the patterns
410410
pattern_path = _resolve_pattern(abspath, return_path = True)
411-
412411
for pattern in self.exclusion_patterns:
413-
if regex.search(pattern, pattern_path):
412+
if re.search(pattern, pattern_path):
414413
log.debug(f"Excluded pattern '{pattern}': {abspath}")
415414
self.excluded_entries.append(f"{pattern} - {pattern_path}")
416415
return True

src/plugins/info/plugin.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import logging
2424
import os
2525
import platform
26-
import regex
26+
import re
2727
import requests
2828
import site
2929
import sys
@@ -408,9 +408,8 @@ def _is_excluded(self, abspath: str) -> bool:
408408

409409
# Resolve the path into POSIX format to match the patterns
410410
pattern_path = _resolve_pattern(abspath, return_path = True)
411-
412411
for pattern in self.exclusion_patterns:
413-
if regex.search(pattern, pattern_path):
412+
if re.search(pattern, pattern_path):
414413
log.debug(f"Excluded pattern '{pattern}': {abspath}")
415414
self.excluded_entries.append(f"{pattern} - {pattern_path}")
416415
return True

0 commit comments

Comments
 (0)