@staticmethod
PYL-R0201137 default_site = pywikibot.Site()
138 self.target_site = target_site or default_site
139
140 def read_file_content(self, file_url: str):141 """Return name of temp file in which remote file is saved."""
142 pywikibot.info('Reading file ' + file_url)
143
933 self.redirectfilter = strtobool(value)
934 return True
935
936 def _handle_pagepile(self, value: str) -> HANDLER_GEN_TYPE: 937 """Handle `-pagepile` argument.
938
939 .. versionadded:: 9.0
300 """Return None."""
301 return None
302
303 def get_requested_time(self, key):304 """Return False."""
305 return False
306
296 """
297 return key in self._cache
298
299 def is_recognised(self, key):300 """Return None."""
301 return None
302
401 self.assertEqual(self._index,
402 len(self._colors) if self.expect_color else 0)
403
404 def _encounter_color(self, color, target_stream):405 """Patched encounter_color method."""
406 raise AssertionError(
407 'This method should not be invoked') # pragma: no cover
The method doesn't use its bound instance. Decorate this method with @staticmethod
decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.