GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 4e029a...744f0d )
by Benjamin
01:30
created

CLI.emptyline()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
import cmd
2
import os
3
4
5
class CLI(cmd.Cmd):
6
    def __init__(self):
7
        cmd.Cmd.__init__(self)
8
        os.system('clear')
9
        self.prompt = "-->>"
10
        self.intro = "SpeedOfPi Command line interface"
11
12
    def do_exit(self, args):
13
        """Exits from the console"""
14
        return -1
15
16
    def do_shell(self, args):
17
        """Pass command to a system shell when line begins with '!'"""
18
        os.system(args)
19
20
    def postloop(self):
21
        """Take care of any unfinished business.
22
           Despite the claims in the Cmd
23
           documentaion, Cmd.postloop() is not a stub.
24
        """
25
        cmd.Cmd.postloop(self)  # Clean up command completion
26
        print("Exiting...")
27
28
    def emptyline(self):
29
        """Do nothing on empty input line"""
30
        pass
31
32
    def default(self, line):
33
        """Called on an input line when the command prefix is not recognized."""
34
        print("Unable to find '{command}' for help on commands type: help".format(command=line))
35
36
    def do_clear(self, args):
37
        """clears the screen"""
38
        os.system('clear')
39
        print(self.intro)
40
41
42
if __name__ == '__main__':
43
    cli = CLI()
44
    cli.cmdloop()
45
46