bbarchivist.dummy.UselessStdout.isatty()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 0
dl 0
loc 6
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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