When initializing Dataset with buffer_size=None, attribute self.buffer_size is not created even though it can be called later in the Dataset methods. Most of the time, it is checked (by checking the value of the self.lazy attribute), however, this is not always the case as in
https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/dataset.py#L569
(Also notice the mypy miss on the type mismatch of 'int' vs 'Tuple[int, int]')
Having the dependency of the value of self.buffer_size on self.lazy is also imho a bad practice and worsens code readability.
When initializing Dataset with buffer_size=None, attribute self.buffer_size is not created even though it can be called later in the Dataset methods. Most of the time, it is checked (by checking the value of the self.lazy attribute), however, this is not always the case as in https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/dataset.py#L569 (Also notice the mypy miss on the type mismatch of 'int' vs 'Tuple[int, int]')
Having the dependency of the value of self.buffer_size on self.lazy is also imho a bad practice and worsens code readability.