mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
fix tests
This commit is contained in:
parent
fd1b7bd05f
commit
2eb9b516b8
3 changed files with 47 additions and 29 deletions
|
|
@ -180,7 +180,7 @@ def test(
|
|||
|
||||
|
||||
def _grep_text(pattern: patterns.Pattern, text: str, color: bool) -> typ.Iterable[str]:
|
||||
all_lines = text.splitlines()
|
||||
all_lines = text.splitlines()
|
||||
for match in pattern.regexp.finditer(text):
|
||||
match_start, match_end = match.span()
|
||||
|
||||
|
|
@ -210,10 +210,7 @@ def _grep_text(pattern: patterns.Pattern, text: str, color: bool) -> typ.Iterabl
|
|||
else:
|
||||
lines[1] = matched_line
|
||||
|
||||
prefixed_lines = [
|
||||
f"{lines_offset + i:>4}: {line}"
|
||||
for i, line in enumerate(lines)
|
||||
]
|
||||
prefixed_lines = [f"{lines_offset + i:>4}: {line}" for i, line in enumerate(lines)]
|
||||
yield "\n".join(prefixed_lines)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ def parse(ctx: ProjectContext, cfg_missing_ok: bool = False) -> MaybeConfig:
|
|||
|
||||
|
||||
def init(
|
||||
project_path: typ.Union[str, pl.Path, None] = ".",
|
||||
project_path : typ.Union[str, pl.Path, None] = ".",
|
||||
cfg_missing_ok: bool = False,
|
||||
) -> typ.Tuple[ProjectContext, MaybeConfig]:
|
||||
ctx = init_project_ctx(project_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue