Skip to content

Commit a634ed5

Browse files
committed
add pre-commit
1 parent 8d870b3 commit a634ed5

File tree

5 files changed

+42
-4
lines changed

5 files changed

+42
-4
lines changed

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
repos:
2+
- repo: https://github.com/asottile/reorder-python-imports
3+
rev: v3.13.0
4+
hooks:
5+
- id: reorder-python-imports
6+
language_version: python3
7+
- repo: https://github.com/psf/black
8+
rev: 24.4.2
9+
hooks:
10+
- id: black
11+
language_version: python3
12+
args: [--safe, --quiet, --line-length, "120"]
13+
require_serial: true
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v4.6.0
16+
hooks:
17+
- id: trailing-whitespace
18+
language_version: python3
19+
- id: end-of-file-fixer
20+
language_version: python3
21+
- id: debug-statements
22+
language_version: python3
23+
- id: check-json
24+
language_version: python3
25+
- repo: https://github.com/PyCQA/flake8
26+
rev: "7.1.0"
27+
hooks:
28+
- id: flake8
29+
language_version: python3
30+
args:
31+
- --max-line-length=130
32+
- --ignore=W503,E203
33+
- repo: https://github.com/asottile/pyupgrade
34+
rev: v3.16.0
35+
hooks:
36+
- id: pyupgrade
37+
language_version: python3

Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM docker.io/library/pypy:3.10-slim-bookworm as BASE
22

33
RUN apt-get update && \
4-
apt-get install -y curl gcc
4+
apt-get install -y curl gcc
55

66
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
77

hooks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def fix_markdown(source_md: str, page: Page, config: MkDocsConfig, files: Files)
9898
source_md = f"# {page.file.name}\n" + source_md
9999
return source_md
100100

101+
101102
on_page_markdown = plugins.CombinedEvent(fix_markdown, populate_index_content)
102103

103104

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ theme:
1111
favicon: images/favicon.ico
1212
name: material
1313
custom_dir: overrides
14-
palette:
14+
palette:
1515
- scheme: default
1616
primary: blue grey
1717
accent: light blue
1818
toggle:
19-
icon: material/brightness-7
19+
icon: material/brightness-7
2020
name: Switch to dark mode
2121
- scheme: slate
2222
primary: black

requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
mike==2.1.2
22
minify_html
33
mkdocs==1.6.0
4-
mkdocs-material==9.5.27
4+
mkdocs-material==9.5.27

0 commit comments

Comments
 (0)