add 'noop()' and 'identity()' functions

This commit is contained in:
Mike Fährmann
2021-05-04 18:00:38 +02:00
parent 755164b36a
commit c5ca7905ce
4 changed files with 20 additions and 4 deletions

View File

@@ -10,7 +10,7 @@
from .booru import BooruExtractor
from .common import Message
from .. import text, exception
from .. import text, util, exception
from ..cache import cache
import collections
@@ -206,7 +206,7 @@ class SankakuAPI():
self.username, self.password = self.extractor._get_auth_info()
if not self.username:
self.authenticate = lambda: None
self.authenticate = util.noop
def pools(self, pool_id):
params = {"lang": "en"}