fix html report generation with pygments >= 2.12.0 (#4110)
pygments 2.12.0 changed the signature of the HtmlFormatter.wrap() method. As we don't actually care about the arguments to wrap we can use packing/unpacking to maintain compatability with older versions of pygments.
This commit is contained in:
parent
14421ae627
commit
d7317b4f8a
|
@ -69,8 +69,7 @@ jobs:
|
||||||
python -m pip install pylint
|
python -m pip install pylint
|
||||||
python -m pip install unittest2
|
python -m pip install unittest2
|
||||||
python -m pip install pytest
|
python -m pip install pytest
|
||||||
# TODO: remove version limitation when cppcheck-htmlreport is adjusted
|
python -m pip install pygments
|
||||||
python -m pip install pygments==2.11.2
|
|
||||||
python -m pip install requests
|
python -m pip install requests
|
||||||
python -m pip install psutil
|
python -m pip install psutil
|
||||||
|
|
||||||
|
|
|
@ -518,9 +518,9 @@ def to_css_selector(tag):
|
||||||
class AnnotateCodeFormatter(HtmlFormatter):
|
class AnnotateCodeFormatter(HtmlFormatter):
|
||||||
errors = []
|
errors = []
|
||||||
|
|
||||||
def wrap(self, source, outfile):
|
def wrap(self, *args, **kwargs):
|
||||||
line_no = 1
|
line_no = 1
|
||||||
for i, t in HtmlFormatter.wrap(self, source, outfile):
|
for i, t in HtmlFormatter.wrap(self, *args, **kwargs):
|
||||||
# If this is a source code line we want to add a span tag at the
|
# If this is a source code line we want to add a span tag at the
|
||||||
# end.
|
# end.
|
||||||
if i == 1:
|
if i == 1:
|
||||||
|
|
Loading…
Reference in New Issue