Completed
Pull Request — master (#143)
by Jasper
01:18
created

Query   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A byModality() 0 3 1
A getFields() 0 2 1
1
from collections import namedtuple
2
QueryField = namedtuple('QueryField', ['name', 'value'])
3
4
class Query(object):
5
6
    fields = []
7
8
    def byModality(self, val):
9
        self.fields.append(QueryField('modality', val))
10
        return self
11
12
    def getFields(self):
13
        return self.fields
14