@@ -10,7 +10,22 @@
Loading
10 10
from twisted.internet import testing
11 11
12 12
13 -
__all__ = testing.__all__
13 +
__all__ = [
14 +
    "AccumulatingProtocol",
15 +
    "LineSendingProtocol",
16 +
    "FakeDatagramTransport",
17 +
    "StringTransport",
18 +
    "StringTransportWithDisconnection",
19 +
    "StringIOWithoutClosing",
20 +
    "_FakeConnector",
21 +
    "_FakePort",
22 +
    "MemoryReactor",
23 +
    "MemoryReactorClock",
24 +
    "RaisingMemoryReactor",
25 +
    "NonStreamingProducer",
26 +
    "waitUntilAllDisconnected",
27 +
    "EventLoggingObserver",
28 +
]
14 29
15 30
16 31
AccumulatingProtocol = testing.AccumulatingProtocol

@@ -37,6 +37,14 @@
Loading
37 37
openFile = open
38 38
39 39
40 +
def _update_doc(opt: Callable[["TwistOptions", str], None], **kwargs: str) -> None:
41 +
    """
42 +
    Update the docstring of a method that implements an option.
43 +
    The string is dedented and the given keyword arguments are substituted.
44 +
    """
45 +
    opt.__doc__ = dedent(opt.__doc__ or "").format(**kwargs)
46 +
47 +
40 48
class TwistOptions(Options):
41 49
    """
42 50
    Command line options for C{twist}.
@@ -76,7 +84,8 @@
Loading
76 84
        else:
77 85
            self["reactorName"] = name
78 86
79 -
    opt_reactor.__doc__ = dedent(opt_reactor.__doc__ or "").format(
87 +
    _update_doc(
88 +
        opt_reactor,
80 89
        options=", ".join('"{}"'.format(rt.shortName) for rt in getReactorTypes()),
81 90
    )
82 91
@@ -101,7 +110,8 @@
Loading
101 110
        except InvalidLogLevelError:
102 111
            raise UsageError("Invalid log level: {}".format(levelName))
103 112
104 -
    opt_log_level.__doc__ = dedent(opt_log_level.__doc__ or "").format(
113 +
    _update_doc(
114 +
        opt_log_level,
105 115
        options=", ".join(
106 116
            '"{}"'.format(constant.name) for constant in LogLevel.iterconstants()
107 117
        ),
@@ -144,7 +154,7 @@
Loading
144 154
            raise UsageError("Invalid log format: {}".format(format))
145 155
        self["logFormat"] = format
146 156
147 -
    opt_log_format.__doc__ = dedent(opt_log_format.__doc__ or "")
157 +
    _update_doc(opt_log_format)
148 158
149 159
    def selectDefaultLogObserver(self) -> None:
150 160
        """
Files Coverage
src/twisted 88.17%
Project Totals (829 files) 88.17%
504313453
TOXENV=alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
504313453
TOXENV=alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
504313453
TOXENV=alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
504313453
TOXENV=alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
504313453
TOXENV=alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
504313453
TOXENV=alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
504313453
TOXENV=alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
1
#
2
# For documentation see https://codecov.io/gh/twisted/twisted/settings/yaml
3
#
4
# We want 100% coverage for new patches to make sure we are always increasing
5
# the coverage.
6
#
7
coverage:
8
  precision: 2
9
  round: down
10
  status:
11
    patch:
12
      default:
13
        target: 100%
14

15
comment: off
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