From 20836be03c7f828e68ba45d3cb23f967d944c02a Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 9 Feb 2021 09:41:36 -0700 Subject: [PATCH] Make CI linting identical to pre-commit hooks linting --- .github/workflows/main.yaml | 11 ++--------- .pre-commit-config.yaml | 17 ++++++----------- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 4b3ec8844..530eca040 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -71,12 +71,5 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - name: pip-install - shell: bash -l {0} - run: | - pip install flake8 black - - name: Lint - shell: bash -l {0} - run: | - flake8 fsspec - black fsspec --check + - uses: pre-commit/action@v2.0.0 + \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 304507f4d..1abd0d0e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,18 +2,13 @@ exclude: > (?x)^( \.tox/.* )$ -default_language_version: - python: python3.7 repos: - - repo: local + - repo: https://github.com/ambv/black + rev: 20.8b1 hooks: - id: black - name: black - entry: black - language: python - require_serial: true - types: [python] - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.4 hooks: - - id: flake8 + - id: flake8 + diff --git a/pyproject.toml b/pyproject.toml index dcf2a9bb3..337566a7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,4 +2,4 @@ # Revert to py34 target syntax to accomodate # errors in trailing commas. # https://github.com/psf/black/pull/763 -target_version = ['py34'] +target_version = ['py36', 'py37', 'py38']