chrisjsewell / sphinx
Showing 2 of 4 files from the diff.
Other files ignored by Codecov
CHANGES has changed.

@@ -10,14 +10,16 @@
Loading
10 10
11 11
import re
12 12
import textwrap
13 +
import warnings
13 14
from os import path
14 -
from typing import Any, Dict, Iterable, Iterator, List, Pattern, Set, Tuple, Union
15 +
from typing import Any, Dict, Iterable, Iterator, List, Optional, Pattern, Set, Tuple, Union
15 16
from typing import TYPE_CHECKING, cast
16 17
17 18
from docutils import nodes, writers
18 19
from docutils.nodes import Element, Node, Text
19 20
20 21
from sphinx import addnodes, __display_version__
22 +
from sphinx.deprecation import RemovedInSphinx50Warning
21 23
from sphinx.domains import IndexEntry
22 24
from sphinx.domains.index import IndexDomain
23 25
from sphinx.errors import ExtensionError
@@ -188,6 +190,7 @@
Loading
188 190
189 191
        self.body = []                  # type: List[str]
190 192
        self.context = []               # type: List[str]
193 +
        self.descs = []                 # type: List[addnodes.desc]
191 194
        self.previous_section = None    # type: nodes.section
192 195
        self.section_level = 0
193 196
        self.seen_title = False
@@ -1364,12 +1367,12 @@
Loading
1364 1367
1365 1368
    # -- Desc
1366 1369
1367 -
    def visit_desc(self, node: Element) -> None:
1368 -
        self.desc = node
1370 +
    def visit_desc(self, node: addnodes.desc) -> None:
1371 +
        self.descs.append(node)
1369 1372
        self.at_deffnx = '@deffn'
1370 1373
1371 -
    def depart_desc(self, node: Element) -> None:
1372 -
        self.desc = None
1374 +
    def depart_desc(self, node: addnodes.desc) -> None:
1375 +
        self.descs.pop()
1373 1376
        self.ensure_eol()
1374 1377
        self.body.append('@end deffn\n')
1375 1378
@@ -1398,6 +1401,12 @@
Loading
1398 1401
        self.escape_hyphens -= 1
1399 1402
        self.desc_type_name = None
1400 1403
1404 +
    def visit_desc_signature_line(self, node: Element) -> None:
1405 +
        pass
1406 +
1407 +
    def depart_desc_signature_line(self, node: Element) -> None:
1408 +
        pass
1409 +
1401 1410
    def visit_desc_name(self, node: Element) -> None:
1402 1411
        pass
1403 1412
@@ -1453,9 +1462,8 @@
Loading
1453 1462
        #     -- instead of --
1454 1463
        #     @deffn {Class} class Foo
1455 1464
        txt = node.astext().strip()
1456 -
        if txt == self.desc['desctype'] or \
1457 -
           txt == self.desc['objtype'] or \
1458 -
           txt in self.desc_type_name.split():
1465 +
        if ((self.descs and txt == self.descs[-1]['objtype']) or
1466 +
                (self.desc_type_name and txt in self.desc_type_name.split())):
1459 1467
            raise nodes.SkipNode
1460 1468
1461 1469
    def depart_desc_annotation(self, node: Element) -> None:
@@ -1525,3 +1533,11 @@
Loading
1525 1533
        self.body.append('\n\n@example\n%s\n@end example\n\n' %
1526 1534
                         self.escape_arg(node.astext()))
1527 1535
        raise nodes.SkipNode
1536 +
1537 +
    @property
1538 +
    def desc(self) -> Optional[addnodes.desc]:
1539 +
        warnings.warn('TexinfoWriter.desc is deprecated.', RemovedInSphinx50Warning)
1540 +
        if len(self.descs):
1541 +
            return self.descs[-1]
1542 +
        else:
1543 +
            return None

@@ -482,7 +482,7 @@
Loading
482 482
    """Evaluate unresolved type annotations in a signature object."""
483 483
    def evaluate_forwardref(ref: ForwardRef, globalns: Dict, localns: Dict) -> Any:
484 484
        """Evaluate a forward reference."""
485 -
        if sys.version_info > (3, 10):
485 +
        if sys.version_info > (3, 9):
486 486
            return ref._evaluate(globalns, localns, frozenset())
487 487
        else:
488 488
            return ref._evaluate(globalns, localns)
Files Coverage
sphinx 81.86%
tests 97.01%
utils 36.82%
setup.py 0.00%
Project Totals (276 files) 84.98%
4.3
TRAVIS_PYTHON_VERSION=3.8
TOXENV=du16
du16=
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading