Skip to content

Commit

Permalink
Upgrade Ruff to 0.3.1 (#1303)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored Mar 8, 2024
1 parent faa3aef commit e766efc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/history/hatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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 20240224
- Upgrade Ruff to 0.2.2
- Upgrade Ruff to 0.3.1
- Upgrade PyApp to 0.15.1 for binary builds

***Fixed:***
Expand Down
4 changes: 4 additions & 0 deletions ruff_defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,15 @@ select = [
"PLE0643",
"PLE0704",
"PLE1132",
"PLE1141",
"PLE1142",
"PLE1205",
"PLE1206",
"PLE1300",
"PLE1307",
"PLE1310",
"PLE1507",
"PLE1519",
"PLE1700",
"PLE2502",
"PLE2510",
Expand Down Expand Up @@ -321,6 +323,7 @@ select = [
"PLW0127",
"PLW0129",
"PLW0131",
"PLW0133",
"PLW0245",
"PLW0406",
"PLW0602",
Expand Down Expand Up @@ -441,6 +444,7 @@ select = [
"RUF025",
"RUF026",
"RUF027",
"RUF028",
"RUF100",
"RUF200",
"S101",
Expand Down
2 changes: 0 additions & 2 deletions scripts/update_ruff.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
'ERA001',
# Business logic relying on other programs has no choice but to use subprocess
'S404',
# Bad recommendation https://github.com/astral-sh/ruff/issues/10030
'S410',
# Too prone to false positives and might be removed https://github.com/astral-sh/ruff/issues/4045
'S603',
# Too prone to false positives https://github.com/astral-sh/ruff/issues/8761
Expand Down
4 changes: 4 additions & 0 deletions src/hatch/cli/fmt/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ def get_config(self, section: str) -> dict[str, Any]:
'PLE0643',
'PLE0704',
'PLE1132',
'PLE1141',
'PLE1519',
'PLR0202',
'PLR0203',
'PLR1704',
Expand All @@ -759,6 +761,7 @@ def get_config(self, section: str) -> dict[str, Any]:
'PLR6201',
'PLR6301',
'PLW0108',
'PLW0133',
'PLW0245',
'PLW0604',
'PLW1501',
Expand All @@ -773,6 +776,7 @@ def get_config(self, section: str) -> dict[str, Any]:
'RUF025',
'RUF026',
'RUF027',
'RUF028',
'S401',
'S402',
'S403',
Expand Down
2 changes: 1 addition & 1 deletion src/hatch/env/internal/static_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def get_default_config() -> dict:
}


RUFF_DEFAULT_VERSION: str = '0.2.2'
RUFF_DEFAULT_VERSION: str = '0.3.1'

0 comments on commit e766efc

Please sign in to comment.