| Conditions | 5 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 7.5412 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | 1 | import logging |
|
| 20 | 1 | def add(self, **kwargs): |
|
| 21 | 1 | if kwargs in self.items: |
|
| 22 | log.debug("Already cached: %s", kwargs) |
||
| 23 | return |
||
| 24 | 1 | if kwargs['key'] == 'custom': |
|
| 25 | log.debug("Skipped caching of custom: %s", kwargs) |
||
| 26 | return |
||
| 27 | 1 | if profanityfilter.is_profane(kwargs['path']): |
|
| 28 | log.debug("Skipped caching of profanity: %s", kwargs) |
||
| 29 | return |
||
| 30 | |||
| 31 | 1 | log.info("Caching: %s", kwargs) |
|
| 32 | |||
| 33 | 1 | self.items.insert(0, kwargs) |
|
| 34 | 1 | while len(self.items) > self.SIZE: |
|
| 35 | self.items.pop() |
||
| 36 | |||
| 37 | 1 | yorm.save(self) |
|
| 38 | |||
| 50 |
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.