Consider decorating method with @staticmethod PYL-R0201
Performance
Major
19 days ago2 years old
Method doesn't use the class instance and could be converted into a static method
137            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
Method doesn't use the class instance and could be converted into a static method
 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
Method doesn't use the class instance and could be converted into a static method
300        """Return None."""
301        return None
302
303    def get_requested_time(self, key):304        """Return False."""
305        return False
306
Method doesn't use the class instance and could be converted into a static method
296        """
297        return key in self._cache
298
299    def is_recognised(self, key):300        """Return None."""
301        return None
302
Method doesn't use the class instance and could be converted into a static method
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