Skip to content

Commit

Permalink
feat: formatting with ruff and more type cleanup (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare authored Mar 31, 2024
1 parent 80c8b5f commit 7caccd8
Show file tree
Hide file tree
Showing 12 changed files with 401 additions and 383 deletions.
33 changes: 0 additions & 33 deletions .flake8

This file was deleted.

7 changes: 0 additions & 7 deletions .isort.cfg

This file was deleted.

33 changes: 6 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,14 @@
repos:
- repo: local
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: black
name: black
language: system
entry: black
types: [python]
- id: isort
name: isort
language: system
entry: isort
types: [python]
- id: flake8
name: flake8
language: system
entry: flake8
types: [python]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies:
- types-openpyxl
- types-pytz
- types-python-dateutil
- types-tqdm
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: ^src/api/client.js$
exclude: ^(src/api/client.js|tests/__snapshots__/.*ambr)$
- id: end-of-file-fixer
exclude: ^src/api/client.js$
- id: check-symlinks
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ As documented in [Usage](#Usage), you can also pass in options on the command li
./suisa_sendemeldung.py --bearer-token=abcdefghijklmnopqrstuvwxyzabcdef --stream_id=a-bcdefgh --stdout
```

## Development

Snapshot testing is used to test the help output, you can update the snapshots like so:
```
poetry run pytest -- --snapshot-update
```

## Release Management

The CI/CD setup uses semantic commit messages following the [conventional commits standard](https://www.conventionalcommits.org/en/v1.0.0/).
Expand Down
5 changes: 3 additions & 2 deletions docs/gen_ref_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
with mkdocs_gen_files.open("reference/SUMMARY.md", "w") as nav_file:
nav_file.writelines(nav.build_literate_nav())

readme = Path("README.md").open("r")
with mkdocs_gen_files.open("index.md", "w") as index_file:
with Path("README.md").open("r") as readme, mkdocs_gen_files.open(
"index.md", "w"
) as index_file:
index_file.writelines(readme.read())
Loading

0 comments on commit 7caccd8

Please sign in to comment.