From 1bf57b73079c82fdfff47fe0a4aa65298ad607b9 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 26 Aug 2023 18:43:58 -0400 Subject: [PATCH] update pre-commit and ruff configurations (#1983) Signed-off-by: Jinzhe Zeng --- .pre-commit-config.yaml | 8 ++++---- pyproject.toml | 12 ++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f63204968..9789de7c1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,15 +18,15 @@ repos: - id: check-toml - id: mixed-line-ending # Python -- repo: https://github.com/psf/black - rev: 23.7.0 - hooks: - - id: black-jupyter - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.0.285 hooks: - id: ruff args: ["--fix"] +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 23.7.0 + hooks: + - id: black-jupyter # numpydoc - repo: https://github.com/Carreau/velin rev: 0.0.12 diff --git a/pyproject.toml b/pyproject.toml index b6a674ab1..3cf5e8a7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,13 +133,11 @@ omit = ["*test*"] profile = "black" [tool.ruff] -target-version = "py37" - select = [ "E", # errors "F", # pyflakes "D", # pydocstyle - "I", # isort + "I", # isort "UP", # pyupgrade "C4", # flake8-comprehensions ] @@ -147,10 +145,8 @@ ignore = [ "E501", # line too long "E741", # ambiguous variable name "E402", # module level import not at top of file - "D413", # missing blank line after last section - "D416", # section name should end with a colon - "D203", # 1 blank line required before class docstring - "D107", # missing docstring in __init__ - "D213", # multi-line docstring summary should start at the second line "D205", # 1 blank line required between summary line and description ] + +[tool.ruff.pydocstyle] +convention = "numpy"