This commit is contained in:
Manuel Barkhau 2019-02-22 22:47:44 +01:00
parent 871a2a9740
commit 99c14c0df9
7 changed files with 10 additions and 11 deletions

View file

@ -27,8 +27,9 @@ _VERBOSE = 0
# To enable pretty tracebacks:
# echo "export ENABLE_BACKTRACE=1;" >> ~/.bashrc
if os.environ.get('ENABLE_BACKTRACE') == "1":
if os.environ.get('ENABLE_BACKTRACE') == '1':
import backtrace
backtrace.hook(align=True, strip_path=True, enable_on_envvar_only=True)
@ -327,5 +328,6 @@ def bump(
_bump(cfg, new_version, allow_dirty)
if __name__ == '__main__':
cli()

View file

@ -20,7 +20,7 @@ from . import version
log = logging.getLogger("pycalver.config")
Patterns = typ.List[str]
Patterns = typ.List[str]
PatternsByGlob = typ.Dict[str, Patterns]
SUPPORTED_CONFIGS = ["setup.cfg", "pyproject.toml", "pycalver.toml"]

View file

@ -187,7 +187,7 @@ def diff(new_version: str, file_patterns: config.PatternsByGlob) -> str:
content = fh.read()
try:
rfd = rfd_from_content(pattern_strs, new_version, content)
rfd = rfd_from_content(pattern_strs, new_version, content)
except ValueError:
errmsg = f"No patterns matched for '{file_path}'"
raise ValueError(errmsg)