Skip to content

Commit c06ccc1

Browse files
committed
Add no-implicit-optional
1 parent 263940e commit c06ccc1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@ repos:
1717
# ===============================================
1818
# Python Hooks
1919
# ===============================================
20+
# no_implicit_optional for ensuring explicit Optional types
21+
- repo: https://github.com/hauntsaninja/no_implicit_optional
22+
rev: "1.4"
23+
hooks:
24+
- id: no_implicit_optional
25+
args: ["--use-union-or"]
26+
2027
# Pyupgrade for upgrading Python syntax to newer versions
2128
- repo: https://github.com/asottile/pyupgrade
22-
rev: v3.11.0
29+
rev: v3.20.0
2330
hooks:
2431
- id: pyupgrade
2532
args: ["--py310-plus"] # Target Python 3.10+ syntax, matching project's target
@@ -33,7 +40,7 @@ repos:
3340

3441
# Ruff for linting and formatting
3542
- repo: https://github.com/astral-sh/ruff-pre-commit
36-
rev: v0.4.8
43+
rev: v0.12.0
3744
hooks:
3845
- id: ruff # Linter: applies auto-fixable linting rules
3946
args: [ "--fix", "--exit-zero" ] # Apply fixes, and exit with 0 even if files were modified

0 commit comments

Comments
 (0)