Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow authored Jun 4, 2024
1 parent 4ddd247 commit e957453
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ jobs:
- run: pip install --upgrade pip setuptools wheel
- run: pip install --editable ".[dev]"
- run: codespell .
- run: ruff --output-format=github .
- run: ruff check --output-format=github .
- run: black --check .
- run: mypy .
- run: pytest -vv .
- run: pytest --doctest-modules .
- run: safety check
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ dev = [
"pytest",
"pytest-clarity",
"ruff",
"safety",
]

[project.scripts]
Expand Down
10 changes: 4 additions & 6 deletions tap2junit/tap13.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,16 @@ def _parse(self, source):
t_attrs["id"] = self.__tests_counter[-1]
t_attrs["id"] = int(t_attrs["id"])
if t_attrs["id"] < self.__tests_counter[-1]:
raise ValueError("Descending test id on line: %r" % line)
raise ValueError(f"Descending test id on line: {line!r}")
# according to TAP13 specs, missing tests must be handled as
# 'not ok' so here we add the missing tests in sequence
while t_attrs["id"] > self.__tests_counter[-1]:
counter = self.__tests_counter[-1]
self.tests.append(
Test(
"not ok",
self.__tests_counter[-1],
comment="DIAG: Test %s not present"
% self.__tests_counter[-1],
comment=f"DIAG: Test {counter} not present",
)
)
self.__tests_counter[-1] += 1
Expand All @@ -210,9 +210,7 @@ def _parse(self, source):
# according to TAP13 specs, everything after this is an
# explanation of why testing must be stopped
t.diagnostics = t.diagnostics or t.description
t.description = (
"Bail out for Test %s" % self.__tests_counter[-1]
)
t.description = f"Bail out for Test {self.__tests_counter[-1]}"
self.tests.append(t)
in_test = True
continue
Expand Down

0 comments on commit e957453

Please sign in to comment.