| Conditions | 6 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 8.1174 |
| Changes | 0 | ||
| 1 | 1 | import logging |
|
| 21 | 1 | def add(self, **kwargs): |
|
| 22 | 1 | if self.disable: |
|
| 23 | 1 | log.debug("Caching disabled") |
|
| 24 | 1 | return |
|
| 25 | |||
| 26 | 1 | if kwargs in self.items: |
|
| 27 | log.debug("Already cached: %s", kwargs) |
||
| 28 | return |
||
| 29 | 1 | if kwargs['key'] == 'custom': |
|
| 30 | log.debug("Skipped caching of custom background: %s", kwargs) |
||
| 31 | return |
||
| 32 | 1 | if profanityfilter.is_profane(kwargs['path']): |
|
| 33 | log.debug("Skipped caching of profane content: %s", kwargs) |
||
| 34 | return |
||
| 35 | |||
| 36 | 1 | log.info("Caching: %s", kwargs) |
|
| 37 | |||
| 38 | 1 | self.items.insert(0, kwargs) |
|
| 39 | 1 | while len(self.items) > self.SIZE: |
|
| 40 | self.items.pop() |
||
| 41 | |||
| 42 | 1 | yorm.save(self) |
|
| 43 | |||
| 55 |
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.