Skip to content

Commit e15df3b

Browse files
committed
Update pre-commit configuration, enhance README, and improve dark/light mode support in mkdocs
1 parent 94b82ff commit e15df3b

File tree

5 files changed

+34
-7
lines changed

5 files changed

+34
-7
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,4 @@ tests/files/.mkdoxy
290290
temp/
291291
local/
292292

293-
.idea/
293+
.idea/

.pre-commit-config.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
---
22
repos:
3+
- repo: https://github.com/sourcery-ai/sourcery
4+
rev: v1.19.0
5+
hooks:
6+
- id: sourcery
7+
# The best way to use Sourcery in a pre-commit hook:
8+
# * review only changed lines:
9+
# * omit the summary
10+
args: [--diff=git diff HEAD, --no-summary]
311
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.5.0
12+
rev: v5.0.0
513
hooks:
614
- id: trailing-whitespace
715
- id: end-of-file-fixer
816
- repo: https://github.com/psf/black
917
rev: 23.9.1
1018
hooks:
1119
- id: black
12-
- repo: https://github.com/charliermarsh/ruff-pre-commit
13-
rev: 'v0.0.292'
20+
- repo: https://github.com/astral-sh/ruff-pre-commit
21+
# Ruff version.
22+
rev: v0.9.6
1423
hooks:
24+
# Run the linter.
1525
- id: ruff
16-
args: [--fix, --exit-non-zero-on-fix]
26+
args: [ --fix, --exit-non-zero-on-fix ]
27+
# Run the formatter.
28+
- id: ruff-format

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pip install mkdoxy
4141
```
4242
Development version with all dependencies:
4343
```bash
44+
python -m venv .venv
4445
python -m pip install mkdoxy ".[dev]"
4546
```
4647

mkdocs.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,23 @@ theme:
2525
repo: fontawesome/brands/github
2626

2727
palette:
28-
- scheme: slate
28+
# Palette toggle for dark mode
29+
- media: "(prefers-color-scheme: dark)"
30+
scheme: slate
2931
primary: orange
3032
accent: orange
33+
toggle:
34+
icon: material/brightness-4
35+
name: Switch to light mode
36+
37+
# Palette toggle for light mode
38+
- media: "(prefers-color-scheme: light)"
39+
scheme: default
40+
primary: orange
41+
accent: orange
42+
toggle:
43+
icon: material/brightness-7
44+
name: Switch to dark mode
3145

3246
extra:
3347
social:

tests/test_doxyrun.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_str2dox_dict_expanded_config_errors():
172172
with pytest.raises(DoxygenCustomConfigNotValid, match=error_message):
173173
doxygen_run.str2dox_dict(dox_str)
174174

175-
dox_str = "BAD_MULTILINE = BAD\n" " VALUE\n"
175+
dox_str = "BAD_MULTILINE = BAD\n VALUE\n"
176176
error_message = str(
177177
"Invalid line: ' VALUE'"
178178
"In custom Doxygen config file: None\n"

0 commit comments

Comments
 (0)