-
Notifications
You must be signed in to change notification settings - Fork 26
Add precommit and run on all files #1541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c1c6f3e
Add precommit
thomasyu888 56c24a6
Merge branch 'develop' into add-precommit
thomasyu888 d1741be
Use pre-commit
thomasyu888 0d5f116
Fix merge conflicts
thomasyu888 e4740c0
Run precommit
thomasyu888 a86ef26
Merge branch 'develop' into add-precommit
thomasyu888 19dc0d5
Merge branch 'develop' into add-precommit
thomasyu888 0c59fae
Add EOL
thomasyu888 ec7ea44
Fix merge conflicts
thomasyu888 e4a8674
Fix merge conflicts
thomasyu888 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,5 +1,5 @@ | ||
| [flake8] | ||
| ignore = | ||
| ignore = | ||
| # E*** / W*** pycodestyle codes | ||
| # whitespace before ',' | ||
| E203, | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ on: | |
| branches: | ||
| - develop | ||
| pull_request: | ||
| workflow_dispatch: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| trivy: | ||
|
|
||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -180,4 +180,4 @@ manifests/* | |
| https:* | ||
|
|
||
| # schematic config file | ||
| config.yml | ||
| config.yml | ||
This file contains hidden or 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,21 +1,68 @@ | ||
| repos: | ||
| # Using this mirror lets us use mypyc-compiled black, which is about 2x faster | ||
| # This is recommended by psf/black: https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml | ||
| - repo: https://github.com/psf/black-pre-commit-mirror | ||
| rev: 23.7.0 | ||
| hooks: | ||
| - id: black | ||
| # It is recommended to specify the latest version of Python | ||
| # supported by your project here, or alternatively use | ||
| # pre-commit's default_language_version, see | ||
| # https://pre-commit.com/#top_level-default_language_version | ||
| language_version: python3.10 | ||
| files: ^(tests|schematic|schematic_api)/ | ||
|
|
||
| - repo: https://github.com/pycqa/isort | ||
| rev: 5.13.2 | ||
| hooks: | ||
| - id: isort | ||
| name: isort (python) | ||
| files: ^(tests|schematic|schematic_api)/ | ||
| args: ["--profile", "black", "--filter-files"] | ||
| exclude: "^docs/conf.py|^docs/build/" | ||
|
|
||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.4.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: check-added-large-files | ||
| - id: check-ast | ||
| # - id: check-json | ||
| - id: check-merge-conflict | ||
| - id: check-xml | ||
| - id: check-yaml | ||
| exclude: ^mkdocs\.yml$ | ||
| - id: debug-statements | ||
| - id: end-of-file-fixer | ||
| - id: requirements-txt-fixer | ||
| - id: mixed-line-ending | ||
| args: ["--fix=auto"] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows | ||
|
|
||
| # - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| # rev: "v0.0.270" | ||
| # hooks: | ||
| # - id: ruff | ||
|
|
||
| # - repo: https://github.com/pycqa/isort | ||
| # rev: 5.13.2 | ||
| # hooks: | ||
| # - id: isort | ||
| # name: isort (python) | ||
|
|
||
| - repo: https://github.com/psf/black | ||
| rev: 23.12.1 | ||
| hooks: | ||
| - id: black | ||
| language_version: python3 | ||
|
|
||
| # - repo: https://github.com/PyCQA/bandit | ||
| # rev: 1.7.5 | ||
| # hooks: | ||
| # - id: bandit | ||
| # args: ["-c", "pyproject.toml"] | ||
| # additional_dependencies: ["bandit[toml]"] | ||
| # - repo: https://github.com/asottile/blacken-docs | ||
| # rev: v1.12.0 | ||
| # hooks: | ||
| # - id: blacken-docs | ||
| # additional_dependencies: [black] | ||
|
|
||
| # - repo: https://github.com/pre-commit/mirrors-mypy | ||
| # rev: 'v1.0.1' | ||
| # hooks: | ||
| # - id: mypy | ||
| # additional_dependencies: [pydantic~=1.10] | ||
|
|
||
| # Checks for missing docstrings | ||
| # - repo: https://github.com/econchick/interrogate | ||
| # rev: 1.5.0 | ||
| # hooks: | ||
| # - id: interrogate | ||
| # exclude: ^(docs/conf.py|setup.py|tests) | ||
| # args: [--config=pyproject.toml] | ||
|
|
||
| # finds dead python code | ||
| # - repo: https://github.com/jendrikseipp/vulture | ||
| # rev: 'v2.7' | ||
| # hooks: | ||
| # - id: vulture | ||
This file contains hidden or 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,2 +1,2 @@ | ||
| [MAIN] | ||
| load-plugins=pylint.extensions.docparams | ||
| load-plugins=pylint.extensions.docparams |
This file contains hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.