From 882d9927ce7cd08acc166e0848127e9fe2d17fa2 Mon Sep 17 00:00:00 2001 From: Ruilong Li Date: Thu, 23 Feb 2023 20:09:20 +0000 Subject: [PATCH] restore hook; fix workflow instead --- .github/workflows/code_checks.yml | 2 +- .pre-commit-config.yaml | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml index 1bc13c92..e6ee2c7d 100644 --- a/.github/workflows/code_checks.yml +++ b/.github/workflows/code_checks.yml @@ -21,7 +21,7 @@ jobs: python-version: "3.8.12" - name: Install dependencies run: | - pip install isort black + pip install isort==5.10.1 black[jupyter]==22.3.0 - name: Run isort run: isort docs/ nerfacc/ scripts/ examples/ tests/ --profile black --skip examples/pycolmap --line-length 80 --check - name: Run Black diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7cd7fd12..ba3c5ffe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,15 +7,15 @@ repos: - id: check-yaml - id: check-merge-conflict - id: requirements-txt-fixer -# - repo: https://github.com/psf/black -# rev: 22.10.0 -# hooks: -# - id: black -# language_version: python3.8.12 -# args: # arguments to configure black -# - --line-length=80 +- repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black + language_version: python3.8.12 + args: # arguments to configure black + - --line-length=80 -# - repo: https://github.com/pycqa/isort -# rev: 5.10.1 -# hooks: -# - id: isort +- repo: https://github.com/pycqa/isort + rev: 5.10.1 + hooks: + - id: isort