diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 6e21223..e222023 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,10 +10,10 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - name: Set up Python 3.9 + - name: Set up Python 3 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3 - name: Versions run: | python3 --version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6b85bc..ed6d3ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,17 +24,11 @@ jobs: # Its necessary to do this here, since 'schedule' events cannot (currently) # be limited (they run on all forks' default branches). if: startswith(github.repository, 'adafruit/') - services: - redis: - image: redis - ports: - - 6379/tcp - options: --entrypoint redis-server steps: - - name: Set up Python 3.9 + - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3 - name: Versions run: | python3 --version @@ -50,6 +44,5 @@ jobs: ADABOT_GITHUB_USER: ${{ secrets.ADABOT_GITHUB_USER }} ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.ADABOT_GITHUB_ACCESS_TOKEN }} RTD_TOKEN: ${{ secrets.RTD_TOKEN }} - REDIS_PORT: ${{ job.services.redis.ports[6379] }} run: | python3 -u -m pytest diff --git a/adabot/arduino_libraries.py b/adabot/arduino_libraries.py index 1c1d9d3..adbeb3b 100644 --- a/adabot/arduino_libraries.py +++ b/adabot/arduino_libraries.py @@ -322,8 +322,8 @@ def main(verbosity=1, output_file=None): # pylint: disable=missing-function-doc run_arduino_lib_checks() except: _, exc_val, exc_tb = sys.exc_info() - logger.error("Exception Occurred!", quiet=True) - logger.error(("-" * 60), quiet=True) + logger.error("Exception Occurred!") + logger.error(("-" * 60)) logger.error("Traceback (most recent call last):") trace = traceback.format_tb(exc_tb) for line in trace: diff --git a/adabot/github_requests.py b/adabot/github_requests.py index 7cb2535..aa40c63 100644 --- a/adabot/github_requests.py +++ b/adabot/github_requests.py @@ -64,7 +64,9 @@ def request(method, url, **kwargs): _fix_url(url), timeout=TIMEOUT, **_fix_kwargs(kwargs) ) from_cache = getattr(response, "from_cache", False) - remaining = int(response.headers.get("X-RateLimit-Remaining", 0)) + # If rate limit remaining is missing, then assume we're fine. Use a million to signify this + # case. GitHub will be in the single thousands. + remaining = int(response.headers.get("X-RateLimit-Remaining", 1000000)) logging.debug( "GET %s %s status=%s", url, diff --git a/requirements.txt b/requirements.txt index dc0c477..a01e790 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,6 @@ packaging==22.0 pylint==3.2.6 pytest pyyaml>=5.4.1 -redis==4.5.4 requests==2.32.0 sh==1.12.14 requests-cache==0.5.2