diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71b2da9..e1b68b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,16 +47,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies - run: pip install --pre flake8==4.0.1 black==22.3.0 + run: pip install ruff - uses: actions/checkout@v4 - run: flake8 - - run: black --check . + - run: ruff --check + - run: ruff format --check test-python: runs-on: ubuntu-latest @@ -71,13 +72,13 @@ jobs: - name: Setup python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.12 # Keep boto version in sync with what is installed inside of the Python # 3.8 lambda. See the link below for reference. # https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html - name: Install dependencies - run: pip install boto3==1.20.32 botocore==1.23.32 + run: pip install boto3==1.34.95 - uses: actions/checkout@v4 - run: python -m tests diff --git a/lambdas/notifier/notifier.py b/lambdas/notifier/notifier.py index a7f6713..c73ed18 100644 --- a/lambdas/notifier/notifier.py +++ b/lambdas/notifier/notifier.py @@ -1,7 +1,6 @@ import json import logging import os -import typing as t import urllib import urllib.request @@ -39,8 +38,8 @@ def format_slack_attachment( environment: str, region: str, action: str, - revision_summary: t.Optional[str], - revision_url: t.Optional[str], + revision_summary: str | None, + revision_url: str | None, ) -> dict: execution_link = ( f"