-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace black and flake8 by ruff (#95)
* bump python to 3.7, add style dependencies * add pre-commit configuration * add configuration in pyproject.toml * run ruff format and fix or ignore all ruff check violation * rm flake8 configuration * edit circle configuration to use ruff * don't change caught exception in _version.py * configure isort in pyproject.toml * configure coverage in pyproject.toml * update codecov.yml * update pypi support version which will update readme badge
- Loading branch information
Mathieu Scheltienne
authored
Apr 26, 2024
1 parent
f1a3c37
commit 689f2e6
Showing
22 changed files
with
184 additions
and
179 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,46 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- repo: https://github.com/psf/black | ||
rev: 24.4.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pycqa/pydocstyle | ||
rev: 6.3.0 | ||
hooks: | ||
- id: pydocstyle | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/pycqa/pydocstyle | ||
rev: 6.3.0 | ||
hooks: | ||
- id: pydocstyle | ||
|
||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
|
||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.7 | ||
hooks: | ||
- id: ruff | ||
name: ruff linter | ||
args: [--fix] | ||
files: nigsp | ||
- id: ruff-format | ||
name: ruff formatter | ||
files: nigsp |
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,43 +1,25 @@ | ||
comment: false | ||
github_checks: # too noisy, even though "a" interactively disables them | ||
annotations: false | ||
|
||
codecov: | ||
branch: master | ||
strict_yaml_branch: master | ||
require_ci_to_pass: true | ||
bot: "codecov-io" | ||
max_report_age: 48 | ||
disable_default_path_fixes: false | ||
notify: | ||
require_ci_to_pass: false | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "60...90" | ||
|
||
parsers: | ||
gcov: | ||
branch_detection: | ||
conditional: yes | ||
loop: yes | ||
method: no | ||
macro: no | ||
|
||
ignore: | ||
- "docs" | ||
- "tests" | ||
- "_version.py" | ||
- "__init__.py" | ||
- "**/__init__.py" | ||
- "due.py" | ||
- ".*rc" | ||
- "versioneer.py" | ||
- "setup.py" | ||
- "nigsp/tests" | ||
- "nigsp/_version.py" | ||
- "nigsp/__init__.py" | ||
- "nigsp/**/__init__.py" | ||
- "nigsp/due.py" | ||
- "nigsp/.*rc" | ||
- "nigsp/versioneer.py" | ||
- "nigsp/setup.py" | ||
comment: | ||
layout: "reach,diff,flags,tree" | ||
behavior: default | ||
require_changes: false | ||
status: | ||
patch: | ||
default: | ||
informational: true | ||
target: 95% | ||
if_no_uploads: error | ||
if_not_found: success | ||
if_ci_failed: error | ||
project: | ||
default: false | ||
library: | ||
informational: true | ||
target: 90% | ||
if_no_uploads: error | ||
if_not_found: success | ||
if_ci_failed: error |
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,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Parser for crispy-octo-broccoli.""" | ||
|
||
import argparse | ||
|
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
Oops, something went wrong.