Total Complexity | 1 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | """ |
||
13 | class GlobCondition(SimpleCondition): |
||
14 | """ |
||
15 | A glob condition matches a field in the row against a glob expression. |
||
16 | """ |
||
17 | |||
18 | # ------------------------------------------------------------------------------------------------------------------ |
||
19 | def match(self, row): |
||
20 | """ |
||
21 | Returns True if the field matches the glob expression of this simple condition. Returns False otherwise. |
||
22 | |||
23 | :param dict row: The row. |
||
24 | |||
25 | :rtype: bool |
||
26 | """ |
||
27 | return fnmatch.fnmatchcase(row[self._field], self._expression) |
||
28 | |||
30 |