Skip to content

Commit b0eb30f

Browse files
renovate[bot]dbanty
authored andcommitted
Unbind upper Ruff limit
1 parent 6e6c21f commit b0eb30f

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
default: patch
3+
---
4+
5+
# Change default Ruff hook to `--fix-only`
6+
7+
This should enable `openapi-python-client` to keep auto-fixing lints (like removing unused imports) but _not_ fail to
8+
generate when unfixable lints are violated.
9+
10+
Since it's now unlikely for breaking changes to affect our usage (and by popular request), the upper bound of `ruff`
11+
has been lifted. Newer versions of `openapi-python-client` should no longer be required to support newer versions of `ruff`.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ In the config file, there's an easy way to tell `openapi-python-client` to run a
166166

167167
```yaml
168168
post_hooks:
169-
- "ruff check . --fix"
169+
- "ruff check . --fix-only"
170170
- "ruff format ."
171171
```
172172

openapi_python_client/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ def from_sources(
9595
post_hooks = config_file.post_hooks
9696
elif meta_type == MetaType.NONE:
9797
post_hooks = [
98-
"ruff check . --fix --extend-select=I",
98+
"ruff check . --fix-only --extend-select=I",
9999
"ruff format .",
100100
]
101101
else:
102102
post_hooks = [
103-
"ruff check --fix .",
103+
"ruff check --fix-only .",
104104
"ruff format .",
105105
]
106106

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"python-dateutil>=2.8.1,<3.0.0",
1515
"httpx>=0.23.0,<0.29.0",
1616
"ruamel.yaml>=0.18.6,<0.19.0",
17-
"ruff>=0.2,<0.15",
17+
"ruff>=0.2",
1818
]
1919
name = "openapi-python-client"
2020
version = "0.26.2"

0 commit comments

Comments
 (0)