perceval/backends/core/github.py
def _update_current_rate_limit(self):
        """Update rate limits data for the current token"""

        url = urijoin(self.base_url, "rate_limit")
        try:
            # Turn off archiving when checking rates, because that would cause
            # archive key conflict (the same URLs giving different responses)
            arch = self.archive
            self.archive = None
            response = super().fetch(url)
            self.archive = arch
            self.update_rate_limit(response)
            self.last_rate_limit_checked = self.rate_limit
        except requests.exceptions.HTTPError as error:
            if error.response.status_code == 404:
                logger.warning("Rate limit not initialized: %s", error)
            else:
                raise error
def _update_current_rate_limit(self):
        """Update rate limits data for the current token"""

        url = urijoin(self.base_url, "rate_limit")
        try:
            # Turn off archiving when checking rates, because that would cause
            # archive key conflict (the same URLs giving different responses)
            arch = self.archive
            self.archive = None
            response = super().fetch(url)
            self.archive = arch
            self.update_rate_limit(response)
            self.last_rate_limit_checked = self.rate_limit
        except requests.exceptions.HTTPError as error:
            if error.response.status_code == 404:
                logger.warning("Rate limit not initialized: %s", error)
            else:
                raise error
def _update_current_rate_limit ( self ) : url = urijoin ( self . base_url , "rate_limit" ) try : # Turn off archiving when checking rates, because that would cause # archive key conflict (the same URLs giving different responses) arch = self . archive self . archive = None response = super ( ) . fetch ( url ) self . archive = arch self . update_rate_limit ( response ) self . last_rate_limit_checked = self . rate_limit except requests . exceptions . HTTPError as error : if error . response . status_code == 404 : logger . warning ( "Rate limit not initialized: %s" , error ) else : raise error
Update rate limits data for the current token
Update rate limits data for the current token