Skip to content

Commit

Permalink
New pre-commit config to match current linting
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Oct 13, 2023
1 parent a9caabe commit ad72fec
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 36 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ jobs:
- name: Lint with mypy
run: |
mypy pytorch_finufft/
68 changes: 34 additions & 34 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
default_language_version:
python: python3.9

default_stages: [commit, push]

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
rev: v3.2.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: LICENSE
- id: check-yaml
- id: check-added-large-files

- repo: local
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: pyupgrade
name: pyupgrade
entry: poetry run pyupgrade --py39-plus
types: [python]
language: system
- id: isort
name: isort (python)

- repo: local
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
name: black
entry: black .
types: [python]
language: system
- id: isort
name: isort
entry: isort pytorch_finufft/
types: [python]
language: system
- id: ruff
name: ruff
entry: ruff --format=github --select=E9,F63,F7,F82 --target-version=py39 pytorch_finufft/
types: [python]
language: system
- id: darglint
name: darglint
entry: darglint -s numpy pytorch_finufft/
types: [python]
language: system

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.292
hooks:
- id: ruff

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
exclude: ^tests/|^examples/
additional_dependencies:
- torch
- finufft



ci:
autoupdate_schedule: quarterly
1 change: 0 additions & 1 deletion ci/docker/Dockerfile-cuda11.8
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ RUN yum install -y \
rm -rf /var/cache/yum/*

ENV PATH /opt/rh/devtoolset-9/root/usr/bin:${PATH}

0 comments on commit ad72fec

Please sign in to comment.