diff options
| author | toonn <toonn@toonn.io> | 2022-05-26 15:22:44 +0200 |
|---|---|---|
| committer | toonn <toonn@toonn.io> | 2022-05-26 15:22:44 +0200 |
| commit | 4a1fc7eb92f11145e945d69e6dd6a0730b5c17c4 (patch) | |
| tree | ba9a24a385fdec73b76a9b657f6bec79cdc27996 | |
| parent | 9252d69ede0b2a086fb7359706d7ef58b41e6561 (diff) | |
| download | ranger-4a1fc7eb92f11145e945d69e6dd6a0730b5c17c4.tar.gz | |
accumulator: Make get_list an abstract method
Implementations need the `self` parameter and PyLint complains when the
number of arguments changes. Since it's never used without
reimplementation, `@abstractmethod` is appropriate.
| -rw-r--r-- | ranger/ext/accumulator.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/ext/accumulator.py b/ranger/ext/accumulator.py index a41db634..c34370d8 100644 --- a/ranger/ext/accumulator.py +++ b/ranger/ext/accumulator.py @@ -3,6 +3,8 @@ from __future__ import (absolute_import, division, print_function) +from abc import abstractmethod + from ranger.ext.direction import Direction @@ -90,8 +92,8 @@ class Accumulator(object): def sync_index(self, **kw): self.move_to_obj(self.pointed_obj, **kw) - @staticmethod - def get_list(): + @abstractmethod + def get_list(self): """OVERRIDE THIS""" return [] |