| Total Complexity | 5 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | class ConvolvedSourcesContainer(object): |
||
| 2 | def __init__(self): |
||
| 3 | |||
| 4 | self._cache = [] |
||
| 5 | |||
| 6 | def reset(self): |
||
| 7 | |||
| 8 | self._cache = [] |
||
| 9 | |||
| 10 | def __getitem__(self, item): |
||
| 11 | |||
| 12 | return self._cache[item] |
||
| 13 | |||
| 14 | def append(self, convolved_point_source): |
||
| 15 | |||
| 16 | self._cache.append(convolved_point_source) |
||
| 17 | |||
| 18 | @property |
||
| 19 | def n_sources_in_cache(self): |
||
| 20 | |||
| 21 | return len(self._cache) |
||
| 22 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.