-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MRG] pre-commit with ruff,codespell,yamlint (#681)
* add file and lint * add ignore words * update tests * codespell commit * test should pass * fix demo flow * upate release file and documentaion for conribution * try to fix doctests * fix tests * remove tets on 3.8 * try other mlegacy option * test correctly
- Loading branch information
Showing
175 changed files
with
20,385 additions
and
9,252 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
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,51 @@ | ||
repos: | ||
# Ruff skada | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.5.2 | ||
hooks: | ||
- id: ruff | ||
name: ruff lint | ||
args: ["--fix"] | ||
files: ^ot/ | ||
- id: ruff | ||
name: ruff lint preview | ||
args: ["--fix", "--preview", "--select=NPY201"] | ||
files: ^ot/ | ||
- id: ruff | ||
name: ruff lint doc, tutorials, tests and examples | ||
# D103: missing docstring in public function | ||
# D400: docstring first line must end with period | ||
args: ["--ignore=D103,D400", "--fix"] | ||
files: ^docs/|^examples/^test/ | ||
- id: ruff-format | ||
files: ^ot/|^docs/|^examples/| | ||
|
||
# Codespell | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: | ||
- tomli | ||
files: ^ot/|^docs/|^examples/ | ||
types_or: [python, bib, rst, inc] | ||
args: [ | ||
"--ignore-words", | ||
"ignore-words.txt", | ||
] | ||
|
||
# yamllint | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.35.1 | ||
hooks: | ||
- id: yamllint | ||
# args: [--strict] | ||
|
||
# # rstcheck | ||
# - repo: https://github.com/rstcheck/rstcheck.git | ||
# rev: v6.2.0 | ||
# hooks: | ||
# - id: rstcheck | ||
# additional_dependencies: | ||
# - tomli | ||
# files: ^docs/source/.*\.(rst|inc)$ |
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,10 @@ | ||
extends: default | ||
|
||
ignore: | | ||
.github/workflows/*.yml | ||
.circleci/config.yml | ||
codecov.yml | ||
rules: | ||
line-length: disable | ||
document-start: disable |
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
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,6 +1,6 @@ | ||
from recommonmark.parser import CommonMarkParser | ||
|
||
source_parsers = {'.md': CommonMarkParser} | ||
source_parsers = {".md": CommonMarkParser} | ||
|
||
source_suffix = ['.md'] | ||
master_doc = 'index' | ||
source_suffix = [".md"] | ||
master_doc = "index" |
Oops, something went wrong.