-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add .pre-commit-config.yaml * add pyproject.toml * ruff . --fix * expand star import * fix mutable default kwarg * white space * os.environ.get -> os.getenv * add lint.yml, remove old lint job from testing.yml * more white space flagged by new lint action * restore accidentally removed __init__ imports use std lib importlib.metadata.version to get pkg version instead of setuptools_scm or pkg_resources
- Loading branch information
Showing
82 changed files
with
1,022 additions
and
1,010 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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
[run] | ||
omit = | ||
omit = | ||
*test* | ||
*/resources.py | ||
*/models.py | ||
*/models/* | ||
*/_consumer/client.py | ||
|
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: pip | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install pre-commit | ||
- name: Run pre-commit | ||
run: | | ||
pre-commit run --all-files --show-diff-on-failure |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
default_stages: [commit] | ||
|
||
default_install_hook_types: [pre-commit, commit-msg] | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.261 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: flake8 | ||
- id: ruff | ||
args: [--fix, --ignore, "D,E501"] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.8.0 | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black-jupyter | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 # Should be a command that runs python3.6+ | ||
- repo: https://github.com/PyCQA/autoflake | ||
rev: v1.5.3 | ||
- id: check-case-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: destroyed-symlinks | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.4 | ||
hooks: | ||
- id: autoflake | ||
- id: codespell | ||
stages: [commit, commit-msg] | ||
exclude_types: [json, bib, svg] | ||
args: [--ignore-words-list, "mater,fwe,te"] |
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
Oops, something went wrong.