Skip to content

Commit 4769d07

Browse files
authored
chore: remove redundant flynt pre-commit hook (#2953)
# Rationale for this change While working on the `ty` integration, I've been auditing the pre-commit hooks. This PR removes the `flynt` pre-commit hook since it;s redundant with ruff's `UP031` and `UP032` rules which are already enabled via the `UP` selector in our `ruff.toml`. `flynt` converts `.format()` and `%` style string formatting to f-strings. Ruff's pyupgrade rules do the same: - **UP031**: `printf-string-formatting`: [converts `%` formatting](https://docs.astral.sh/ruff/rules/printf-string-formatting/) - **UP032**: `f-string`: [converts `.format()` calls ](https://docs.astral.sh/ruff/rules/f-string/) and both produce identical results ## Are these changes tested? `make lint` Manual tests: Code: `"Hello, {}".format(name)` - flynt: `f"Hello, {name}"` - ruff: `f"Hello, {name}"` ## Are there any user-facing changes? No
1 parent b8b8c53 commit 4769d07

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@ repos:
6363
]
6464
additional_dependencies:
6565
- tomli==2.0.1
66-
- repo: https://github.com/ikamensh/flynt
67-
rev: 1.0.6
68-
hooks:
69-
- id: flynt
70-
args:
71-
# --line-length is set to a high value to deal with very long lines
72-
- --line-length
73-
- '99999'
7466
- repo: https://github.com/codespell-project/codespell
7567
rev: v2.4.1
7668
hooks:

0 commit comments

Comments
 (0)