Add pre-commit
This commit is contained in:
parent
673d10b823
commit
445827690a
|
@ -0,0 +1,22 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: check-toml
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/asottile/blacken-docs
|
||||
rev: 1.15.0
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
args: [--skip-errors, --skip-string-normalization]
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.12.0
|
||||
hooks:
|
||||
- id: isort
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Jordan Cook
|
||||
Copyright (c) 2023 Jordan Cook
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
5
Makefile
5
Makefile
|
@ -3,7 +3,7 @@ SOURCE_DIR = pages
|
|||
BUILD_DIR = _build/html
|
||||
TAGS_DIR = pages/tags
|
||||
|
||||
all: clean docs linkcheck size publish
|
||||
all: clean lint docs linkcheck size publish
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR) $(TAGS_DIR)
|
||||
|
@ -11,6 +11,9 @@ clean:
|
|||
docs:
|
||||
sphinx-build $(SOURCE_DIR) $(BUILD_DIR)
|
||||
|
||||
lint:
|
||||
pre-commit run --all
|
||||
|
||||
linkcheck:
|
||||
sphinx-build -b linkcheck $(SOURCE_DIR) $(BUILD_DIR)
|
||||
|
||||
|
|
|
@ -116,4 +116,3 @@ insects, spiders, and other tiny curiosities.
|
|||
```
|
||||
[_Artomyces pyxidatus_ (Crown-tipped Coral Fungus)](https://flickr.com/photos/jcook83/48921844066)
|
||||
:::
|
||||
|
||||
|
|
|
@ -86,4 +86,3 @@ and photograph some plants in a small indoor garden.
|
|||
```
|
||||
[_Dioscorea elephantipes_ (Elephant's Foot)](https://flickr.com/photos/jcook83/50552435987)
|
||||
:::
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
[tool.black]
|
||||
skip-string-normalization = true
|
||||
line-length = 100
|
||||
|
||||
[tool.isort]
|
||||
profile = 'black'
|
||||
line_length = 100
|
||||
skip_gitignore = true
|
|
@ -7,3 +7,6 @@ sphinx-copybutton>=0.5
|
|||
sphinx-design>=0.4
|
||||
sphinx-notfound-page>=0.8
|
||||
sphinx-tags>=0.2
|
||||
|
||||
# dev tools; not required for doc builds
|
||||
pre-commit~=3.0
|
Loading…
Reference in New Issue