-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f06c6c
commit 357ec8e
Showing
6 changed files
with
130 additions
and
57 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,38 +1,27 @@ | ||
exclude: scripts/ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-merge-conflict | ||
- id: mixed-line-ending | ||
args: ['--fix=lf'] | ||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
|
||
# Ruff is a replacement for flake8 and many other linters (much faster too) | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.6.1 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.8.3 | ||
- id: ruff | ||
args: ["--fix"] | ||
# Run the formatter. | ||
- id: ruff-format | ||
|
||
# ensures __future__ import annotations at top of files which require it | ||
# for the typing features they are using. | ||
- repo: https://github.com/frostming/fix-future-annotations | ||
rev: 0.5.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-black | ||
- flake8-breakpoint | ||
- flake8-docstrings | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
args: ["--profile", "black"] | ||
- id: isort | ||
name: isort (cython) | ||
types: [cython] | ||
- id: isort | ||
name: isort (pyi) | ||
types: [pyi] | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.3.9 | ||
hooks: | ||
- id: nbstripout | ||
files: ".ipynb" | ||
- id: fix-future-annotations |
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,8 +1,9 @@ | ||
"""Module for reporting the version of dbscan1d.""" | ||
|
||
from importlib.metadata import PackageNotFoundError, version | ||
|
||
try: | ||
__version__ = version("dbscan1d") | ||
# package is not installed | ||
except PackageNotFoundError: # NOQA | ||
__version__ = "0.0.0" # NOQA | ||
except PackageNotFoundError: | ||
__version__ = "0.0.0" |
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