From e3cddd7e69c939f9fcec6768c1ab02a0d1927af6 Mon Sep 17 00:00:00 2001 From: nyanpasu64 Date: Fri, 25 Jan 2019 19:27:46 -0800 Subject: [PATCH] Move scipy-imported files to scipy/ subdir (#153) So I can exclude it from mypy. --- .coveragerc | 2 +- .pre-commit-config.yaml | 2 +- corrscope/triggers.py | 4 ++-- corrscope/utils/scipy/__init__.py | 0 corrscope/utils/{scipy_signal.py => scipy/signal.py} | 0 corrscope/utils/{scipy_wavfile.py => scipy/wavfile.py} | 0 corrscope/utils/{scipy_windows.py => scipy/windows.py} | 0 corrscope/wave.py | 2 +- pyproject.toml | 2 +- tests/test_wave.py | 4 +--- 10 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 corrscope/utils/scipy/__init__.py rename corrscope/utils/{scipy_signal.py => scipy/signal.py} (100%) rename corrscope/utils/{scipy_wavfile.py => scipy/wavfile.py} (100%) rename corrscope/utils/{scipy_windows.py => scipy/windows.py} (100%) diff --git a/.coveragerc b/.coveragerc index e8007cf..506aa12 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,2 +1,2 @@ [run] -omit = *utils/scipy_* +omit = *utils/scipy/* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 679e3cf..4a5e5ec 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,4 +4,4 @@ repos: hooks: - id: black language_version: python3.6 - exclude: 'utils/scipy_' + exclude: 'utils/scipy/' diff --git a/corrscope/triggers.py b/corrscope/triggers.py index 27c09b7..f133a9d 100644 --- a/corrscope/triggers.py +++ b/corrscope/triggers.py @@ -5,8 +5,8 @@ from typing import TYPE_CHECKING, Type, Tuple, Optional, ClassVar import attr import numpy as np -import corrscope.utils.scipy_signal as signal -import corrscope.utils.scipy_windows as windows +import corrscope.utils.scipy.signal as signal +import corrscope.utils.scipy.windows as windows from corrscope.config import KeywordAttrs, CorrError, Alias, CorrWarning from corrscope.util import find, obj_name from corrscope.utils.windows import midpad, leftpad diff --git a/corrscope/utils/scipy/__init__.py b/corrscope/utils/scipy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/corrscope/utils/scipy_signal.py b/corrscope/utils/scipy/signal.py similarity index 100% rename from corrscope/utils/scipy_signal.py rename to corrscope/utils/scipy/signal.py diff --git a/corrscope/utils/scipy_wavfile.py b/corrscope/utils/scipy/wavfile.py similarity index 100% rename from corrscope/utils/scipy_wavfile.py rename to corrscope/utils/scipy/wavfile.py diff --git a/corrscope/utils/scipy_windows.py b/corrscope/utils/scipy/windows.py similarity index 100% rename from corrscope/utils/scipy_windows.py rename to corrscope/utils/scipy/windows.py diff --git a/corrscope/wave.py b/corrscope/wave.py index 1a51907..c9ac11d 100644 --- a/corrscope/wave.py +++ b/corrscope/wave.py @@ -6,7 +6,7 @@ from typing import Union, List import numpy as np -import corrscope.utils.scipy_wavfile as wavfile +import corrscope.utils.scipy.wavfile as wavfile from corrscope.config import CorrError, CorrWarning, TypedEnumDump FLOAT = np.single diff --git a/pyproject.toml b/pyproject.toml index 5cc220e..64135fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ html = 'scripts:html' [tool.black] line-length = 88 py36 = true -exclude = 'utils/scipy_' +exclude = 'utils/scipy/' [build-system] requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api" diff --git a/tests/test_wave.py b/tests/test_wave.py index a3d69a8..b512add 100644 --- a/tests/test_wave.py +++ b/tests/test_wave.py @@ -1,15 +1,13 @@ import warnings from typing import Sequence -from hypothesis import given -import hypothesis.strategies as hs import numpy as np from numpy.testing import assert_allclose import pytest from delayed_assert import expect, assert_expectations from corrscope.config import CorrError -from corrscope.utils.scipy_wavfile import WavFileWarning +from corrscope.utils.scipy.wavfile import WavFileWarning from corrscope.wave import Wave, Flatten prefix = "tests/wav-formats/"