-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ruff lint and format, isort, codespell (#152)
* Ruff lint and format, isort, codespell
- Loading branch information
Showing
39 changed files
with
4,650 additions
and
2,602 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,58 +1,41 @@ | ||
repos: | ||
# The warnings/errors we check for here are: | ||
# E901 - SyntaxError or IndentationError | ||
# E902 - IOError | ||
# F822 - undefined name in __all__ | ||
# F823 - local variable name referenced before assignment | ||
# Others are taken care of by autopep8 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 7.0.0 | ||
# This should be before any formatting hooks like isort | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.3.5" | ||
hooks: | ||
- id: flake8 | ||
args: | ||
[ | ||
"--count", | ||
"--select", | ||
"E901,E902,F822,F823", | ||
] | ||
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|cm/__init__.py|sunpy/extern|sunpy/visualization/colormaps/color_tables.py)$" | ||
- repo: https://github.com/PyCQA/autoflake | ||
rev: v2.3.1 | ||
hooks: | ||
- id: autoflake | ||
args: | ||
[ | ||
"--in-place", | ||
"--remove-all-unused-imports", | ||
"--remove-unused-variable", | ||
] | ||
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$" | ||
- id: ruff | ||
args: ["--fix"] | ||
# Run the formatter. | ||
- id: ruff-format | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
args: ["--sp", "setup.cfg"] | ||
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|cm/__init__.py|docs/conf.py)$" | ||
- repo: https://github.com/hhatto/autopep8 | ||
rev: v2.2.0 | ||
hooks: | ||
- id: autopep8 | ||
args: ["--in-place", "--max-line-length", "200"] | ||
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|cm/__init__.py)$" | ||
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*)$" | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: trailing-whitespace | ||
exclude: ".*(.fits|.fts|.fit|.txt)$" | ||
exclude: ".*(.fits|.fts|.fit|.header|.txt)$" | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: check-added-large-files | ||
args: ["--enforce-all", "--maxkb=1054"] | ||
- id: end-of-file-fixer | ||
exclude: ".*(.fits|.fts|.fit|.txt|tca.*)$" | ||
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|.json)$|^CITATION.rst$" | ||
- id: mixed-line-ending | ||
exclude: ".*(.fits|.fts|.fit|.txt|tca.*)$" | ||
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*)$" | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: | ||
- tomli | ||
args: ["--write-changes"] | ||
exclude: ".ipynb" | ||
|
||
ci: | ||
autofix_prs: false | ||
autofix_prs: false | ||
autoupdate_schedule: "quarterly" |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.