Skip to content

Commit 0d3894b

Browse files
author
Marius Isken
committed
pre-commit: update
1 parent 2ce80c4 commit 0d3894b

File tree

14 files changed

+45
-34
lines changed

14 files changed

+45
-34
lines changed

.github/workflows/black.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-python@v3
11+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
4-
- repo: local
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v3.2.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/psf/black
12+
rev: 22.10.0
513
hooks:
614
- id: black
7-
name: black
8-
language: system
9-
types: [python]
10-
entry: black
11-
# language_version: python3.6
15+
- repo: https://github.com/pycqa/isort
16+
rev: 5.10.1
17+
hooks:
18+
- id: isort

lightguide/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import pkg_resources
22

3-
43
__version__ = pkg_resources.get_distribution("lightguide").version

lightguide/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
from .lightguide import * # noqa
21
from .afk_filter_python import * # noqa
2+
from .lightguide import * # noqa

lightguide/gf.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import numpy as np
2-
3-
from scipy import interpolate, ndimage, signal
41
from collections.abc import Iterable
52

6-
from pyrocko.guts import Object, Float, List, Tuple, String, Timestamp, Bool
3+
import numpy as np
4+
import pyrocko.orthodrome as od
75
from pyrocko import gf
6+
from pyrocko.guts import Bool, Float, List, Object, String, Timestamp, Tuple
87
from pyrocko.model import Location
9-
import pyrocko.orthodrome as od
8+
from scipy import interpolate, ndimage, signal
109

1110
r2d = 180.0 / np.pi
1211
km = 1e3

lightguide/lightguide.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

3-
import numpy.typing as npt
43
import numpy as np
4+
import numpy.typing as npt
55

66
def triangular_taper(
77
window_size: tuple[int, int], plateau: tuple[int, int]

lightguide/restitution.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from __future__ import annotations
2+
23
from typing import TYPE_CHECKING
34

45
import numpy as np
56
from scipy import signal
6-
from .utils import traces_to_numpy_and_meta
77

8+
from .utils import traces_to_numpy_and_meta
89

910
if TYPE_CHECKING:
1011
from pyrocko.trace import Trace

lightguide/utils.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
from __future__ import annotations
2-
from enum import Enum
3-
from tempfile import SpooledTemporaryFile
42

5-
import time
63
import logging
4+
import time
5+
from enum import Enum
76
from functools import wraps
87
from pathlib import Path
8+
from tempfile import SpooledTemporaryFile
99
from typing import Any, Callable
10-
import requests
1110

1211
import numpy as np
1312
import numpy.typing as npt
13+
import requests
1414
from pyrocko.trace import Trace
1515
from scipy.signal import butter, lfilter
1616

17-
1817
# create console handler
1918
ch = logging.StreamHandler()
2019
formatter = logging.Formatter("\x1b[80D\x1b[1A\x1b[K%(message)s")

test/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
23
from lightguide import gf
34

45
km = 1e3

0 commit comments

Comments
 (0)