| Total Complexity | 8 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| 1 | 1 | import os |
|
| 40 | class TemplateStore: |
||
| 41 | 1 | ||
| 42 | 1 | def __init__(self, root): |
|
| 43 | self.root = root |
||
| 44 | 1 | self._items = {} |
|
| 45 | 1 | for key in os.listdir(self.root): |
|
| 46 | 1 | if key[0] not in ('.', '_'): |
|
| 47 | 1 | model = TemplateModel(key, self.root) |
|
| 48 | yorm.update_file(model) |
||
| 49 | self._items[key] = model |
||
| 50 | 1 | ||
| 51 | def read(self, key): |
||
| 52 | 1 | try: |
|
| 53 | 1 | model = self._items[key] |
|
| 54 | 1 | except KeyError: |
|
| 55 | return None |
||
| 56 | 1 | else: |
|
| 57 | return model.domain |
||
| 58 | 1 | ||
| 59 | 1 | def filter(self, **_): |
|
| 60 | 1 | templates = [] |
|
| 61 | 1 | for model in self._items.values(): |
|
| 62 | templates.append(model.domain) |
||
| 63 | return templates |
||
| 64 |
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.pyfiles in your module folders. Make sure that you place one file in each sub-folder.