Skip to content

Commit b3dad9f

Browse files
authored
feat: Drop Python 3.9 support for v1.5.0 (#231)
Drop Python 3.9 support for v1.5.0
1 parent 31a75ea commit b3dad9f

4 files changed

Lines changed: 42 additions & 305 deletions

File tree

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ comparison.
3232
## Table of Contents
3333

3434
- [Why cpp-linter-hooks?](#why-cpp-linter-hooks)
35+
- [Requirements](#requirements)
3536
- [Quick Start](#quick-start)
3637
- [Custom Configuration Files](#custom-configuration-files)
3738
- [Custom Clang Tool Version](#custom-clang-tool-version)
@@ -49,14 +50,18 @@ comparison.
4950
- [Contributing](#contributing)
5051
- [License](#license)
5152

53+
## Requirements
54+
55+
`cpp-linter-hooks` v1.5.0 and later requires Python 3.10 or newer.
56+
5257
## Quick Start
5358

5459
Add this configuration to your `.pre-commit-config.yaml` file:
5560

5661
```yaml
5762
repos:
5863
- repo: https://github.com/cpp-linter/cpp-linter-hooks
59-
rev: v1.4.2 # Use the tag or commit you want
64+
rev: v1.5.0 # Use the tag or commit you want
6065
hooks:
6166
- id: clang-format
6267
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
@@ -71,7 +76,7 @@ To use custom configurations like `.clang-format` and `.clang-tidy`:
7176
```yaml
7277
repos:
7378
- repo: https://github.com/cpp-linter/cpp-linter-hooks
74-
rev: v1.4.2
79+
rev: v1.5.0
7580
hooks:
7681
- id: clang-format
7782
args: [--style=file] # Loads style from .clang-format file
@@ -80,7 +85,7 @@ repos:
8085
```
8186

8287
> [!TIP]
83-
> The `rev` tag (e.g. `v1.4.2`) is the **project** version, not the clang tool version. Each release bundles a default version of `clang-format` and `clang-tidy` — check the [release notes](https://github.com/cpp-linter/cpp-linter-hooks/releases) to see which tool version a given `rev` ships with. To pin an exact tool version independently of the project release, use `--version` as shown below.
88+
> The `rev` tag (e.g. `v1.5.0`) is the **project** version, not the clang tool version. Each release bundles a default version of `clang-format` and `clang-tidy` — check the [release notes](https://github.com/cpp-linter/cpp-linter-hooks/releases) to see which tool version a given `rev` ships with. To pin an exact tool version independently of the project release, use `--version` as shown below.
8489

8590
### Custom Clang Tool Version
8691

@@ -89,7 +94,7 @@ To use specific versions of clang-format and clang-tidy (using Python wheel pack
8994
```yaml
9095
repos:
9196
- repo: https://github.com/cpp-linter/cpp-linter-hooks
92-
rev: v1.4.2
97+
rev: v1.5.0
9398
hooks:
9499
- id: clang-format
95100
args: [--style=file, --version=21] # Specifies version
@@ -113,7 +118,7 @@ automatically — no configuration needed for most projects:
113118
```yaml
114119
repos:
115120
- repo: https://github.com/cpp-linter/cpp-linter-hooks
116-
rev: v1.4.2
121+
rev: v1.5.0
117122
hooks:
118123
- id: clang-tidy
119124
args: [--checks=.clang-tidy]
@@ -228,7 +233,7 @@ Use -header-filter=.* to display errors from all non-system headers. Use -system
228233
```yaml
229234
repos:
230235
- repo: https://github.com/cpp-linter/cpp-linter-hooks
231-
rev: v1.4.2 # requires the version that introduced --fix
236+
rev: v1.5.0 # includes --fix support
232237
hooks:
233238
- id: clang-tidy
234239
args: [--checks=.clang-tidy, --fix]
@@ -247,7 +252,7 @@ repos:
247252

248253
```yaml
249254
- repo: https://github.com/cpp-linter/cpp-linter-hooks
250-
rev: v1.4.2
255+
rev: v1.5.0
251256
hooks:
252257
- id: clang-format
253258
args: [--style=file, --version=21]
@@ -262,7 +267,7 @@ or `-j`:
262267

263268
```yaml
264269
- repo: https://github.com/cpp-linter/cpp-linter-hooks
265-
rev: v1.4.2
270+
rev: v1.5.0
266271
hooks:
267272
- id: clang-tidy
268273
args: [--checks=.clang-tidy, --version=21, --jobs=4]
@@ -291,7 +296,7 @@ This approach ensures that only modified files are checked, further speeding up
291296
```yaml
292297
repos:
293298
- repo: https://github.com/cpp-linter/cpp-linter-hooks
294-
rev: v1.4.2
299+
rev: v1.5.0
295300
hooks:
296301
- id: clang-format
297302
args: [--style=file, --version=21, --verbose] # Shows processed files

examples/cmake/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ If you already have a CMake project, you need **two files**:
77
```yaml
88
repos:
99
- repo: https://github.com/cpp-linter/cpp-linter-hooks
10-
rev: v1.4.2
10+
rev: v1.5.0
1111
hooks:
1212
- id: clang-format
1313
args: [--style=file, --version=21]

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=45", "setuptools-scm"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
requires-python = ">=3.9"
6+
requires-python = ">=3.10"
77
name = "cpp_linter_hooks"
88
description = "Automatically formats and lints C/C++ code using clang-format and clang-tidy"
99
readme = "README.md"
@@ -22,7 +22,6 @@ classifiers = [
2222
"Operating System :: Microsoft :: Windows",
2323
"Operating System :: POSIX :: Linux",
2424
"Operating System :: MacOS",
25-
"Programming Language :: Python :: 3.9",
2625
"Programming Language :: Python :: 3.10",
2726
"Programming Language :: Python :: 3.11",
2827
"Programming Language :: Python :: 3.12",
@@ -31,7 +30,7 @@ classifiers = [
3130
"Topic :: Software Development :: Build Tools",
3231
]
3332
dependencies = [
34-
"pip>=20.3", # Required to install clang-format and clang-tidy
33+
"pip>=26.1", # Required to install clang-format and clang-tidy
3534
"tomli>=1.1.0; python_version < '3.11'",
3635
]
3736
dynamic = ["version"]
@@ -48,7 +47,7 @@ tracker = "https://github.com/cpp-linter/cpp-linter-hooks/issues"
4847
dev = [
4948
"coverage",
5049
"pre-commit",
51-
"pytest",
50+
"pytest>=9.0.3",
5251
"pytest-codspeed",
5352
]
5453

0 commit comments

Comments
 (0)