Skip to content

Commit

Permalink
Fix black error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Spacetown committed Aug 9, 2022
1 parent fbd9233 commit dc0e5c0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions gcovr/writer/cobertura.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@

from ..version import __version__
from ..utils import open_binary_for_writing, presentable_filename
from ..coverage import CovData, CoverageStat, FileCoverage, FunctionCoverage, LineCoverage, SummarizedStats
from ..coverage import (
CovData,
CoverageStat,
FileCoverage,
FunctionCoverage,
LineCoverage,
SummarizedStats,
)


def print_cobertura_report(covdata: CovData, output_file, options):
Expand Down Expand Up @@ -78,7 +85,9 @@ def print_cobertura_report(covdata: CovData, output_file, options):
sorted_lines = sorted(data.lines)
iter_reversed_sorted_lines = iter(reversed(sorted_lines))
methods = []
for function in sorted(data.functions, key=lambda f: data.functions[f].lineno, reverse=True):
for function in sorted(
data.functions, key=lambda f: data.functions[f].lineno, reverse=True
):
function_cov = data.functions[function]
elem = _method_element(function_cov)
methods.append(elem)
Expand Down Expand Up @@ -111,7 +120,6 @@ def print_cobertura_report(covdata: CovData, output_file, options):
elem.set("branch-rate", _rate(function_branch))
elem.set("complexity", "0.0")


elem = etree.SubElement(c, "methods")
for method in reversed(methods):
elem.append(method)
Expand Down

0 comments on commit dc0e5c0

Please sign in to comment.