diff --git a/pyproject.toml b/pyproject.toml index c6fa326..67a2a52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "poetryup" -version = "0.3.6" +version = "0.3.7" description = "Update dependencies and bump their version in the pyproject.toml file" authors = ["Mousa Zeid Baker"] packages = [ diff --git a/src/poetryup/poetryup.py b/src/poetryup/poetryup.py index b6832d3..9c4cb01 100644 --- a/src/poetryup/poetryup.py +++ b/src/poetryup/poetryup.py @@ -55,9 +55,10 @@ def _list_dependencies() -> List[Dependency]: output = _run_poetry_show() + pattern = re.compile("^[a-zA-Z-]+") dependencies: List[Dependency] = [] for line in output.split("\n"): - if re.match("^[a-zA-Z]+", line) is not None: + if pattern.match(line) is not None: name, version, *_ = line.split() dependency = Dependency(name=name, version=version) dependencies.append(dependency)