MyWidget.__init__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
c 3
b 0
f 0
dl 0
loc 2
rs 10
1
import tkinter
2
3
4
class MyWidget:  # pragma : no cover
5
    def __init__(self, label):
6
        self.label = label
7
8
9
class TrueFalseWidget(MyWidget):  # pragma : no cover
10
    def __init__(self, label):
11
        super(TrueFalseWidget, self).__init__(label)
12
        self.widget = None
13
        self.labelw = None
14
15
    def draw(self, root, line):
16
        self.widget = tkinter.Checkbutton(root)
17
        self.widget.grid(column=1, row=line, sticky=tkinter.NSEW)
18
        self.labelw = tkinter.Label(root, text=self.label, justify=tkinter.LEFT)
19
        self.labelw.grid(column=2, row=line, sticky=tkinter.NSEW)
20
21
22
class ScaleWidget(tkinter.Frame):  # pragma : no cover
23
    def __init__(self, master, label, min_, max_, redundancy=0):
24
        super(ScaleWidget, self).__init__(master)
25
        self.min = min_
26
        self.max = max_
27
        self.variables = [tkinter.Entry(master, width=2) for _ in range(redundancy + 1)]
28
        self.label = tkinter.Label(master, text=label)
29