diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 34a809f..c4f3c72 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -7,28 +7,6 @@ on: branches: master jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.4.0 - - uses: actions/setup-python@v2.3.1 - - uses: pre-commit/action@v2.0.3 - type-check: - name: mypy - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2.4.0 - - name: Set up Python 3.8 - uses: actions/setup-python@v2.3.1 - with: - python-version: 3.8 - - name: Install isort - run: | - python -m pip install mypy - - name: mypy check - run: | - mypy dac_costing test: name: ${{ matrix.python-version }}-build runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9e92460..166a48a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,30 +1,42 @@ +ci: + autofix_prs: false + repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-docstring-first + - id: check-json + - id: check-yaml + - id: debug-statements + - id: mixed-line-ending -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.3.0 + - repo: https://github.com/asottile/pyupgrade + rev: v3.3.1 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-docstring-first - - id: check-json - - id: check-yaml + - id: pyupgrade + args: + - "--py38-plus" -- repo: https://github.com/ambv/black - rev: 20.8b1 + - repo: https://github.com/psf/black + rev: 23.3.0 hooks: - - id: black - args: ["--line-length", "100"] + - id: black -- repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.4 + - repo: https://github.com/keewis/blackdoc + rev: v0.3.8 hooks: - - id: flake8 + - id: blackdoc -- repo: https://github.com/asottile/seed-isort-config - rev: v2.2.0 + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: "v0.0.260" hooks: - - id: seed-isort-config -- repo: https://github.com/pre-commit/mirrors-isort - rev: v5.6.4 + - id: ruff + args: ["--fix"] + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.0-alpha.6 hooks: - - id: isort + - id: prettier