Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanTolksdorf committed Sep 27, 2023
1 parent e1deeff commit 6f58665
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pontos/version/commands/_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
from ..errors import VersionError
from ..version import Version, VersionUpdate

VERSION_PATTERN = r"^(?P<pre>.*[^\d])(?P<version>\d+\.\d+\.\d+(-?([ab]|rc|alpha|beta)\d+(.dev\d+)?)?)(?P<post>.*$)"
VERSION_PATTERN = (r"^(?P<pre>.*[^\d])"
r"(?P<version>\d+\.\d+\.\d+"
r"(-?([ab]|rc|alpha|beta)\d+(.dev\d+)?)?)"
r"(?P<post>.*$)")


# This class is used for Java Version command(s)
Expand Down Expand Up @@ -133,7 +136,8 @@ def _read_versions_from_files(self) -> Dict:
readlines = f.readlines()

Check warning on line 136 in pontos/version/commands/_java.py

View check run for this annotation

Codecov / codecov/patch

pontos/version/commands/_java.py#L135-L136

Added lines #L135 - L136 were not covered by tests
if line_number - 1 > len(readlines):
raise VersionError(

Check warning on line 138 in pontos/version/commands/_java.py

View check run for this annotation

Codecov / codecov/patch

pontos/version/commands/_java.py#L138

Added line #L138 was not covered by tests
f"Line number:{line_number} is beyond file lines:{len(readlines) + 1} "
f"Line number:{line_number} "
f"is beyond file lines:{len(readlines) + 1} "
f"file:'{file_path}'"
)
version_line = readlines[line_number - 1]
Expand Down

0 comments on commit 6f58665

Please sign in to comment.