bbarchivist.dummy   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 33
rs 10
c 0
b 0
f 0
ccs 11
cts 11
cp 1
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A UselessStdout.isatty() 0 6 1
A UselessStdout.write() 0 6 1
A UselessStdout.flush() 0 6 1
1
#!/usr/bin/env python3
2 5
"""This module is used for dummy exceptions, stdout, etc."""
3
4 5
__author__ = "Thurask"
5 5
__license__ = "WTFPL v2"
6 5
__copyright__ = "2015-2019 Thurask"
7
8
9 5
class UselessStdout(object):
10
    """
11
    A dummy IO stream. Does nothing, by design.
12
    """
13 5
    @staticmethod
14
    def write(inp):
15
        """
16
        Do nothing.
17
        """
18 5
        pass
19
20 5
    @staticmethod
21
    def flush():
22
        """
23
        Do nothing.
24
        """
25 5
        pass
26
27 5
    @staticmethod
28
    def isatty():
29
        """
30
        Convince module we're in a terminal.
31
        """
32
        return True
33