DeprecationWarning: Flags not at the start of the expression
JulienPalard opened this issue · 1 comments
JulienPalard commented
For anchored matches, the ^
is being inserted before the flags:
>>> import gitignore_parser
>>> from pathlib import Path
>>> gitignore_parser.rule_from_pattern("/foo", Path(".").resolve()).match("42")
/home/mdk/clones/gitignore_parser/gitignore_parser.py:143: DeprecationWarning: Flags not at the start of the expression '^(?ms)foo$'
if re.search(self.regex, rel_path):
False
excitoon commented
@JulienPalard we shall fix it by ourselves I guess. Wdyt?