Lint on GitHub Actions (#196)

- Lint with pre-commit on GitHub Actions,
- Add some handy pre-hooks,
- Configure Ruff lint rules (https://github.com/astral-sh/ruff).

---------

Co-authored-by: Marc Wrobel <marc.wrobel@gmail.com>
This commit is contained in:
Hugo van Kemenade
2023-11-26 22:08:12 +02:00
committed by GitHub
parent 0d17306872
commit 8870ab5e28
8 changed files with 64 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ count = 0
count_auto = 0
products_dir = sys.argv[1] if len(sys.argv) > 1 else 'website/products/'
for product_file in sorted(list(glob(f'{products_dir}/*.md'))):
with open(product_file, "r") as f:
with open(product_file) as f:
data = frontmatter.load(f)
count += 1
title = data['title']