diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a19fa1..d79f46b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,13 +16,13 @@ repos: args: ["--autofix", "--indent=2", "--no-sort-keys"] - repo: https://github.com/PyCQA/isort - rev: 7.0.0 + rev: 8.0.1 hooks: - id: isort args: ["--profile", "black", "--filter-files"] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.3.1 hooks: - id: black args: ["--line-length", "100"] @@ -33,7 +33,7 @@ repos: - id: flake8 - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.2 hooks: - id: codespell # Ignores `.ipynb` files, `_build` and `_static` folders diff --git a/src/ooipy/request/hydrophone_request.py b/src/ooipy/request/hydrophone_request.py index 07bc003..6e345a3 100644 --- a/src/ooipy/request/hydrophone_request.py +++ b/src/ooipy/request/hydrophone_request.py @@ -348,10 +348,8 @@ def get_acoustic_data( for k, st in enumerate(st_list): if len(st) > mseed_file_limit: if verbose: - print( - f"Number of traces in mseed file, {valid_data_url_list[k]}\n\ - exceed mseed_file_limit: {mseed_file_limit}." - ) + print(f"Number of traces in mseed file, {valid_data_url_list[k]}\n\ + exceed mseed_file_limit: {mseed_file_limit}.") return None # combine list of single traces into stream of straces @@ -881,94 +879,68 @@ def __get_LF_locations_stats(node, channel): if node == "Slope_Base" or node == "HYSB1": station = "HYSB1" if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "Southern_Hydrate" or node == "HYS14": station = "HYS14" if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "Axial_Base" or node == "AXBA1": station = "AXBA1" if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "Central_Caldera" or node == "AXCC1": station = "AXCC1" if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "Eastern_Caldera" or node == "AXEC2": station = "AXEC2" if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "AXAS1": station = "AXAS1" if channel not in ["EHN", "EHE", "EHZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "AXAS2": station = "AXAS2" if channel not in ["EHN", "EHE", "EHZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "AXEC1": station = "AXEC1" if channel not in ["EHN", "EHE", "EHZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "AXEC3": station = "AXEC3" if channel not in ["EHN", "EHE", "EHZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "AXID1": station = "AXID1" if channel not in ["EHN", "EHE", "EHZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "HYS11": station = "HYS11" if channel not in ["EHN", "EHE", "EHZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "HYS12": station = "HYS12" if channel not in ["EHN", "EHE", "EHZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") elif node == "HYS13": station = "HYS13" if channel not in ["EHN", "EHE", "EHZ"]: - raise Exception( - f"Invalid Channel String {channel} for node {node}.\n\ - see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI" - ) + raise Exception(f"Invalid Channel String {channel} for node {node}.\n\ + see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI") else: raise Exception(