diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8db79409d..cf1c26575 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,11 +30,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -45,7 +45,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -59,4 +59,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml index 7583c7121..e401e4394 100644 --- a/.github/workflows/format_check.yml +++ b/.github/workflows/format_check.yml @@ -8,20 +8,20 @@ jobs: runs-on: ubuntu-latest name: Black steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 - name: Black - uses: psf/black@20.8b1 # already includes args "--check --diff" + uses: psf/black@22.3.0 # already includes args "--check --diff" flake8: runs-on: ubuntu-latest name: Flake8 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: - python-version: 3.9 + python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade wheel pip @@ -29,7 +29,7 @@ jobs: - name: Lint examples run: flake8 examples --show-source - name: Lint scripts - run: flake8 setup.py docs/conf.py --show-source + run: flake8 setup.py docs/conf.py scripts --show-source - name: Lint tests run: flake8 tests --show-source - name: Lint moviepy @@ -38,14 +38,14 @@ jobs: runs-on: ubuntu-latest name: isort steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: - python-version: '3.x' + python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade pip pip install isort - name: Check imports - run: isort --check-only moviepy tests examples docs/conf.py + run: isort --check-only moviepy tests examples docs/conf.py scripts diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml index e41c0c391..5353e26d5 100644 --- a/.github/workflows/test_suite.yml +++ b/.github/workflows/test_suite.yml @@ -3,13 +3,7 @@ name: Run Test Suite -on: - push: - branches: - - '**' - pull_request: - branches: - - '**' +on: [push, pull_request] jobs: # Uses Python Framework build because on macos matplotlib requires it @@ -19,7 +13,7 @@ jobs: matrix: python-version: [3.7] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: s-weigand/setup-conda@v1 with: activate-conda: true @@ -70,15 +64,15 @@ jobs: python-version: [3.6, 3.7, 3.8, 3.9] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Get ImageMagick installer from cache id: imagemagick-installer-cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ImageMagick.exe @@ -135,9 +129,9 @@ jobs: python-version: [3.6, 3.7, 3.8, 3.9] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a93cd567c..f9dd36d34 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,22 +1,24 @@ repos: - repo: https://github.com/PyCQA/flake8 - rev: 3.9.2 + rev: 4.0.1 hooks: - id: flake8 additional_dependencies: - - flake8-implicit-str-concat - - flake8-absolute-import + - flake8-absolute-import>=1.0 + - flake8-docstrings>=1.6.0 + - flake8-rst-docstrings>=0.2.5 + - flake8-implicit-str-concat==0.3.0 name: flake8-test files: \.py$ - repo: https://github.com/PyCQA/isort - rev: 5.8.0 + rev: 5.10.1 hooks: - id: isort args: - '--filter-files' files: \.py$ - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 22.3.0 hooks: - id: black language_version: python3.6 diff --git a/scripts/get-latest-imagemagick-win.py b/scripts/get-latest-imagemagick-win.py index b48cc8033..c51620d27 100644 --- a/scripts/get-latest-imagemagick-win.py +++ b/scripts/get-latest-imagemagick-win.py @@ -1,6 +1,9 @@ +"""Obtain the latest ImageMagick version from official repositories.""" + import sys from urllib.request import urlopen + BINARIES_URL = "https://download.imagemagick.org/ImageMagick/download/binaries/" content = urlopen(BINARIES_URL).read().decode("utf-8") diff --git a/setup.py b/setup.py index e6b432242..7537a858b 100644 --- a/setup.py +++ b/setup.py @@ -104,13 +104,13 @@ def run_tests(self): ] lint_reqs = [ - "black>=20.8b1", - "flake8>3.7.0,<4.0.0", + "black>=22.3.0", + "flake8>=4.0.1", "flake8-absolute-import>=1.0", - "flake8-docstrings>=1.5.0", - "flake8-rst-docstrings>=0.0.14", - "flake8-implicit-str-concat==0.2.0", - "isort>=5.7.0", + "flake8-docstrings>=1.6.0", + "flake8-rst-docstrings>=0.2.5", + "flake8-implicit-str-concat==0.3.0", + "isort>=5.10.1", "pre-commit>=2.9.3", ]