-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add linter & pipeline * Should work now * Remove ignores * Update lockfile * Update pre commit * Update lock * Update poetry * ignore pyright
- Loading branch information
Showing
5 changed files
with
171 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '**' | ||
pull_request: {} | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- run: | | ||
pip install poetry | ||
poetry install -E test | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: no-commit-to-branch # prevent direct commits to main branch | ||
- id: check-yaml | ||
args: ["--unsafe"] | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: local | ||
hooks: | ||
- id: ruff | ||
name: Ruff | ||
entry: poetry run ruff | ||
args: ["check", "--fix"] | ||
types: [python] | ||
language: system | ||
- id: ruff format | ||
name: Ruff Format | ||
entry: poetry run ruff | ||
args: [format] | ||
language: system | ||
types: [python] | ||
# - id: pyright | ||
# name: pyright | ||
# entry: poetry run pyright | ||
# language: system | ||
# types: [python] | ||
# pass_filenames: false | ||
- id: lockfile | ||
name: lockfile | ||
entry: poetry check | ||
args: [--lock] | ||
language: system | ||
pass_filenames: false | ||
files: "pyproject.toml|poetry.lock" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[virtualenvs] | ||
in-project = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters