This file is indexed.

/usr/lib/mypy/xml/mypy-txt.xslt is in python3-mypy 0.560-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
<?xml version="1.0" encoding="utf-8"?>
<!-- vim: set sts=2 sw=2: -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" xmlns:str="http://exslt.org/strings">
  <xsl:output method="text"/>
  <xsl:template match="/mypy-report-index">
    <!-- It's possible to output without the <xsl:text> but it's harder to control. -->
    <xsl:text>Mypy Type Check Coverage Summary&#10;</xsl:text>
    <xsl:text>================================&#10;</xsl:text>
    <xsl:text>&#10;</xsl:text>
    <xsl:text>Script: </xsl:text><xsl:value-of select="@name"/><xsl:text>&#10;</xsl:text>
    <xsl:text>&#10;</xsl:text>

    <xsl:variable name="max_module_width">
      <xsl:for-each select="file">
        <xsl:sort select="string-length(@module)" data-type="number"/>
        <xsl:if test="position() = last()">
          <xsl:value-of select="string-length(@module)"/>
        </xsl:if>
      </xsl:for-each>
    </xsl:variable>
    <xsl:variable name="max_imprecision_width" select="string-length('100.00% imprecise')"/>
    <xsl:variable name="max_loc_width" select="string-length(concat(sum(file/@total), ' LOC'))"/>

    <xsl:text>+-</xsl:text>
    <xsl:value-of select="str:padding($max_module_width, '-')"/>
    <xsl:text>-+-</xsl:text>
    <xsl:value-of select="str:padding($max_imprecision_width, '-')"/>
    <xsl:text>-+-</xsl:text>
    <xsl:value-of select="str:padding($max_loc_width, '-')"/>
    <xsl:text>-+&#10;</xsl:text>

    <xsl:text>| </xsl:text>
    <xsl:value-of select="'Module'"/>
    <xsl:value-of select="str:padding($max_module_width - string-length('Module'), ' ')"/>
    <xsl:text> | </xsl:text>
    <xsl:value-of select="'Imprecision'"/>
    <xsl:value-of select="str:padding($max_imprecision_width - string-length('Imprecision'), ' ')"/>
    <xsl:text> | </xsl:text>
    <xsl:value-of select="'Lines'"/>
    <xsl:value-of select="str:padding($max_loc_width - string-length('Lines'), ' ')"/>
    <xsl:text> |&#10;</xsl:text>

    <xsl:text>+-</xsl:text>
    <xsl:value-of select="str:padding($max_module_width, '-')"/>
    <xsl:text>-+-</xsl:text>
    <xsl:value-of select="str:padding($max_imprecision_width, '-')"/>
    <xsl:text>-+-</xsl:text>
    <xsl:value-of select="str:padding($max_loc_width, '-')"/>
    <xsl:text>-+&#10;</xsl:text>

    <xsl:for-each select="file">
      <xsl:variable name="score" select="(@imprecise + @any) div (@total + not(number(@total)))"/>
      <xsl:variable name="imprecision" select="concat(format-number($score, '0.00%'), ' imprecise')"/>
      <xsl:variable name="lines" select="concat(@total, ' LOC')"/>

      <xsl:text>| </xsl:text>
      <xsl:value-of select="@module"/>
      <xsl:value-of select="str:padding($max_module_width - string-length(@module), ' ')"/>
      <xsl:text> | </xsl:text>
      <xsl:value-of select="str:padding($max_imprecision_width - string-length($imprecision), ' ')"/>
      <xsl:value-of select="$imprecision"/>
      <xsl:text> | </xsl:text>
      <xsl:value-of select="str:padding($max_loc_width - string-length($lines), ' ')"/>
      <xsl:value-of select="$lines"/>
      <xsl:text> |&#10;</xsl:text>
    </xsl:for-each>

    <xsl:text>+-</xsl:text>
    <xsl:value-of select="str:padding($max_module_width, '-')"/>
    <xsl:text>-+-</xsl:text>
    <xsl:value-of select="str:padding($max_imprecision_width, '-')"/>
    <xsl:text>-+-</xsl:text>
    <xsl:value-of select="str:padding($max_loc_width, '-')"/>
    <xsl:text>-+&#10;</xsl:text>

    <xsl:variable name="total" select="sum(file/@total)"/>
    <xsl:variable name="score" select="(sum(file/@imprecise|file/@any)) div ($total + not(number($total)))"/>
    <xsl:variable name="imprecision" select="concat(format-number($score, '0.00%'), ' imprecise')"/>
    <xsl:variable name="lines" select="concat($total, ' LOC')"/>

    <xsl:text>| </xsl:text>
    <xsl:value-of select="'Total'"/>
    <xsl:value-of select="str:padding($max_module_width - string-length('Total'), ' ')"/>
    <xsl:text> | </xsl:text>
    <xsl:value-of select="str:padding($max_imprecision_width - string-length($imprecision), ' ')"/>
    <xsl:value-of select="$imprecision"/>
    <xsl:text> | </xsl:text>
    <xsl:value-of select="str:padding($max_loc_width - string-length($lines), ' ')"/>
    <xsl:value-of select="$lines"/>
    <xsl:text> |&#10;</xsl:text>

    <xsl:text>+-</xsl:text>
    <xsl:value-of select="str:padding($max_module_width, '-')"/>
    <xsl:text>-+-</xsl:text>
    <xsl:value-of select="str:padding($max_imprecision_width, '-')"/>
    <xsl:text>-+-</xsl:text>
    <xsl:value-of select="str:padding($max_loc_width, '-')"/>
    <xsl:text>-+&#10;</xsl:text>
  </xsl:template>
</xsl:stylesheet>