@staticmethod
PYL-R0201149 except (IOError, ValueError) as e:
150 log.warning("Error writing to cache file: %s", e)
151
152 def is_instance(self):153 """Check if project holder is valid instance."""
154 return False
155
40 self.hostname = PypiRepoSession.DEFAULT_HOSTNAME
41 self.project = self.get_project()
42
43 def release_download_url(self, release, shorter=False):44 """Get release download URL."""
45 for f in release["files"]:
46 if f["packagetype"] == "sdist":
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.