From ee1b88312f1c25f9801f6fbba466703f033ca645 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sun, 21 Apr 2024 20:02:35 -0400 Subject: [PATCH] Upgrade Ruff to 0.4.1 (#1414) --- docs/history/hatch.md | 2 +- ruff_defaults.toml | 2 ++ src/hatch/cli/fmt/core.py | 2 ++ src/hatch/env/internal/static_analysis.py | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/history/hatch.md b/docs/history/hatch.md index 9c43e4a55..3de24ca2b 100644 --- a/docs/history/hatch.md +++ b/docs/history/hatch.md @@ -26,7 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Use the Git user as the default username for new project URL metadata - Add `HATCH_DEBUG` environment variable that when enabled will show local variables in the case of unhandled tracebacks - Upgrade default CPython distributions to 20240415 -- Upgrade Ruff to 0.4.0 +- Upgrade Ruff to 0.4.1 - Upgrade PyApp to 0.17.0 for binary builds - Bump the minimum supported version of Hatchling to 1.24.1 diff --git a/ruff_defaults.toml b/ruff_defaults.toml index 71064df2e..b55849d60 100644 --- a/ruff_defaults.toml +++ b/ruff_defaults.toml @@ -288,8 +288,10 @@ select = [ "PLE0302", "PLE0303", "PLE0304", + "PLE0305", "PLE0307", "PLE0308", + "PLE0309", "PLE0604", "PLE0605", "PLE0643", diff --git a/src/hatch/cli/fmt/core.py b/src/hatch/cli/fmt/core.py index 1a648fb4e..0d8183c0a 100644 --- a/src/hatch/cli/fmt/core.py +++ b/src/hatch/cli/fmt/core.py @@ -752,7 +752,9 @@ def get_config(self, section: str) -> dict[str, Any]: 'PLE0115', 'PLE0303', 'PLE0304', + 'PLE0305', 'PLE0308', + 'PLE0309', 'PLE0643', 'PLE0704', 'PLE1132', diff --git a/src/hatch/env/internal/static_analysis.py b/src/hatch/env/internal/static_analysis.py index 37828bed2..78881a362 100644 --- a/src/hatch/env/internal/static_analysis.py +++ b/src/hatch/env/internal/static_analysis.py @@ -17,4 +17,4 @@ def get_default_config() -> dict[str, Any]: } -RUFF_DEFAULT_VERSION: str = '0.4.0' +RUFF_DEFAULT_VERSION: str = '0.4.1'