File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,15 @@ def __gen_regex(self, skip_lines):
5252 """
5353 for skip_line in skip_lines :
5454 norm_skip_path = os .path .normpath (skip_line [1 :].strip ())
55+ # fnmatch places a '\Z' at the end, this is equivalent to '$'
56+ # (end of input) so it must be removed.
57+ # Optionally we match the user given path with a '/.*' ending.
58+ # This, if the given input is a folder will
59+ # resolve all files contained within.
60+ # Note: normalization removes '/' from the end, see:
61+ # https://docs.python.org/3/library/os.path.html#os.path.normpath
5562 rexpr = re .compile (
56- fnmatch .translate (norm_skip_path ) + r"(?:\ /.*)?" )
63+ fnmatch .translate (norm_skip_path )[: - 2 ] + r"(?:/.*)?\Z " )
5764 self .__skip .append ((skip_line , rexpr ))
5865
5966 def __check_line_format (self , skip_lines ):
You can’t perform that action at this time.
0 commit comments