-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add py.typed file and fix mypy, improve pre-commit configuration (#124)
- Loading branch information
Showing
16 changed files
with
2,860 additions
and
3,715 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 |
---|---|---|
|
@@ -20,4 +20,4 @@ changelog: | |
- ci | ||
- title: 🤷🏻 Other changes | ||
labels: | ||
- '*' | ||
- "*" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# first get line with version_info, then extract thing in parantheses, then replace ", " with "." | ||
# first get line with version_info, then extract thing in parentheses, then replace ", " with "." | ||
grep "version_info =" | sed "s/^.*(\([^()]*\)).*$/\1/" | sed "s/, /./g" |
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
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 |
---|---|---|
|
@@ -53,19 +53,8 @@ jobs: | |
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
- name: Set up pixi | ||
uses: prefix-dev/[email protected] | ||
- uses: quantco/pre-commit-conda@v1 | ||
with: | ||
python-version: '3.8' | ||
|
||
lint-workflow-files: | ||
name: "Lint workflow files" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
# https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions | ||
- name: Download actionlint | ||
id: get_actionlint | ||
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
- name: Check workflow files | ||
run: ${{ steps.get_actionlint.outputs.executable }} -color | ||
python-version: "3.8" |
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 |
---|---|---|
@@ -1,17 +1,42 @@ | ||
exclude: ^\.copier-answers\.yml$ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
- repo: local | ||
hooks: | ||
- id: check-yaml | ||
# ruff | ||
- id: ruff | ||
name: ruff | ||
entry: pixi run -e lint ruff check --fix --exit-non-zero-on-fix --force-exclude | ||
language: system | ||
types_or: [python, pyi] | ||
require_serial: true | ||
- id: ruff-format | ||
name: ruff-format | ||
entry: pixi run -e lint ruff format --force-exclude | ||
language: system | ||
types_or: [python, pyi] | ||
require_serial: true | ||
# mypy | ||
- id: mypy | ||
name: mypy | ||
entry: pixi run -e default mypy | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
# pre-commit-hooks | ||
- id: trailing-whitespace-fixer | ||
name: trailing-whitespace-fixer | ||
entry: pixi run -e lint trailing-whitespace-fixer | ||
language: system | ||
types: [text] | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-toml | ||
- repo: https://github.com/quantco/pre-commit-mirrors-ruff | ||
rev: 0.4.3 | ||
hooks: | ||
- id: ruff-conda | ||
- id: ruff-format-conda | ||
- repo: https://github.com/quantco/pre-commit-mirrors-mypy | ||
rev: 1.10.0 | ||
hooks: | ||
- id: mypy-conda | ||
name: end-of-file-fixer | ||
entry: pixi run -e lint end-of-file-fixer | ||
language: system | ||
types: [text] | ||
# typos | ||
- id: typos | ||
name: typos | ||
entry: pixi run -e lint typos --force-exclude | ||
language: system | ||
types: [text] | ||
require_serial: 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
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
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
File renamed without changes.
Oops, something went wrong.