From 385ec235a4060696d5a402d2c57e299365bcf171 Mon Sep 17 00:00:00 2001 From: Anh Trinh Date: Tue, 16 Jan 2024 08:59:32 +0100 Subject: [PATCH] Fix ruff config flagged by repo review --- .pre-commit-config.yaml | 2 +- pyproject.toml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 464d80d7415..4af262a0a04 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: rev: 'v0.1.9' hooks: - id: ruff - args: ["--fix"] + args: ["--fix", "--show-fixes"] # https://github.com/python/black#version-control-integration - repo: https://github.com/psf/black-pre-commit-mirror rev: 23.12.1 diff --git a/pyproject.toml b/pyproject.toml index a9ed847e7e6..e59971df3a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -232,6 +232,8 @@ exclude = [ "_typed_ops.pyi", ] target-version = "py39" + +[tool.ruff.lint] # E402: module level import not at top of file # E501: line too long - let black worry about that # E731: do not assign a lambda expression, use a def @@ -248,7 +250,7 @@ select = [ "UP", # Pyupgrade ] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["xarray"] [tool.pytest.ini_options]