-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial setup of QA pre-commit tools [cf-units] (#522)
* Added extra pre-commit default hooks * Added codespell pre-commit hook * Added mypy and configuration * Added mypy exrts dependency * Added ignores for mypy (including one in sp-repo-review) * Added validate-pyproject * Added numpydoc precommit hook and ignored errors in pyproject.toml * Updated ignore_list of sp-repo-review for errors that have been addressed in this branch * Fixed sp-repo-review "PC901" (Custom pre-commit CI message) * Added extra pytest config, as recommended by sp-repo-review. * Added `filterwarnings=error` option for pytest and an exception for thie existing known Deprecation warnings * - Enabled all Ruff checks. - Required lots of additions to the Ruff ignore list - Extra additions to mypy ignore list - Autofixes from Ruff linter - Fixes from codespell * Tidy up pyproject.toml. - Removed some duplicate ruff ignores - Reorded some subsections * Updated Ruff config: - Added: `force-sort-within-sections = true` - Auto updated files resultig from above - file specific ignores * Auto-corrections for - Trailing witespace - No neline at end of file - Some Ruff linting * - Update Ruff version. - Add trailing / to mypy exclude paths * Try different approach to MyPy ignore files in .pre-commit config * Update pyproject.toml Added extra ignores in mypy for _udunits generated code * Update pyproject.toml Re-added PY005 test to sp-repo-review ignore list. * Roll back changes to _antlr4_runtime and add .pre-commit exclusion for this directory * Added reference comment to .pre-commit-config.yaml * Removed redundant setting * Removed comment * Alphabetise repo-review ignore list * Ahphabetised pre-commit hooks, as per template * Added explanation comments to Ruff ignores * Added reference to common SciTools linting rules Wiki * Removed D212 from Ruff select * Reinstate D212 Ruff rule. This also updated one docstring in cf_units/__init__.py (correctly) due to the removal of a redundant `noqa: E501` marker in a previous commit
- Loading branch information
1 parent
4ad25ba
commit 03aed8e
Showing
28 changed files
with
568 additions
and
501 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,4 +1,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true)$ | ||
ref-names: $Format:%D$ | ||
ref-names: $Format:%D$ |
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
Oops, something went wrong.