From 909aba8ccc79d2a7a121a3cc00eb0f9569e39987 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 31 May 2022 16:18:53 +0400 Subject: [PATCH 1/2] Install latest version of black that supports Python 2.7 --- noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 4eed694d3..12ff627cb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -46,7 +46,7 @@ def test(session): @nox.session() def format(session): - session.install("black", "isort") + session.install("black==21.12b0", "click==8.0.4", "isort") session.run( "black", "--target-version=py27", "--target-version=py37", *SOURCE_FILES ) @@ -58,7 +58,7 @@ def format(session): @nox.session def lint(session): - session.install("flake8", "black", "isort") + session.install("flake8", "black==21.12b0", "click==8.0.4", "isort") session.run( "black", "--check", From dd0101042ecc0256e02e72182d6f4c62aa7cf365 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 31 May 2022 16:24:41 +0400 Subject: [PATCH 2/2] Fix GitHub Actions install steps --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ec7536a4..f3a116bd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,9 +43,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Set up Python 3.8 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install dependencies @@ -65,24 +65,24 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Setup Elasticsearch run: | mkdir /tmp/elasticsearch wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${{ matrix.es-version }}-linux-x86_64.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 /tmp/elasticsearch/bin/elasticsearch -d - name: Setup Python - ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Set up Python 3.8 for Nox if: matrix.python-version != '3.8' - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3 - name: Install dependencies run: | - python3.8 -m pip install nox + python3 -m pip install nox - name: Run Tests run: | nox -rs test-${{ matrix.python-version }}