"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pylint/config/argument.py" between
pylint-2.17.5.tar.gz and pylint-2.17.6.tar.gz

About: pylint analyzes Python source code looking for bugs and signs of poor quality.

argument.py  (pylint-2.17.5):argument.py  (pylint-2.17.6)
skipping to change at line 114 skipping to change at line 114
"""Return `re.compile(value)`.""" """Return `re.compile(value)`."""
try: try:
return re.compile(value) return re.compile(value)
except re.error as e: except re.error as e:
msg = f"Error in provided regular expression: {value} beginning at index {e.pos}: {e.msg}" msg = f"Error in provided regular expression: {value} beginning at index {e.pos}: {e.msg}"
raise argparse.ArgumentTypeError(msg) from e raise argparse.ArgumentTypeError(msg) from e
def _regexp_csv_transfomer(value: str) -> Sequence[Pattern[str]]: def _regexp_csv_transfomer(value: str) -> Sequence[Pattern[str]]:
"""Transforms a comma separated list of regular expressions.""" """Transforms a comma separated list of regular expressions."""
patterns: list[Pattern[str]] = [] patterns: list[Pattern[str]] = []
for pattern in _csv_transformer(value): for pattern in pylint_utils._check_regexp_csv(value):
patterns.append(_regex_transformer(pattern)) patterns.append(_regex_transformer(pattern))
return patterns return patterns
def _regexp_paths_csv_transfomer(value: str) -> Sequence[Pattern[str]]: def _regexp_paths_csv_transfomer(value: str) -> Sequence[Pattern[str]]:
"""Transforms a comma separated list of regular expressions paths.""" """Transforms a comma separated list of regular expressions paths."""
patterns: list[Pattern[str]] = [] patterns: list[Pattern[str]] = []
for pattern in _csv_transformer(value): for pattern in _csv_transformer(value):
patterns.append( patterns.append(
re.compile( re.compile(
str(pathlib.PureWindowsPath(pattern)).replace("\\", "\\\\") str(pathlib.PureWindowsPath(pattern)).replace("\\", "\\\\")
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)