Skip to content

Commit

Permalink
Remove unnecessary imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mbsantiago committed Nov 10, 2024
1 parent c97a87b commit 039c002
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions batdetect2/train/train_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import glob
import json
import os
import random

import numpy as np

Expand Down
3 changes: 2 additions & 1 deletion batdetect2/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Types used in the code base."""

from typing import List, NamedTuple, Optional, Union

import numpy as np
Expand All @@ -17,7 +18,7 @@


try:
from typing import NotRequired
from typing import NotRequired # type: ignore
except ImportError:
from typing_extensions import NotRequired

Expand Down
4 changes: 2 additions & 2 deletions batdetect2/utils/detector_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
try:
from numpy.exceptions import AxisError
except ImportError:
from numpy import AxisError
from numpy import AxisError # type: ignore

import batdetect2.detector.compute_features as feats
import batdetect2.detector.post_process as pp
Expand Down Expand Up @@ -759,7 +759,7 @@ def process_file(

# Get original sampling rate
file_samp_rate = librosa.get_samplerate(audio_file)
orig_samp_rate = file_samp_rate * config.get("time_expansion", 1) or 1
orig_samp_rate = file_samp_rate * (config.get("time_expansion") or 1)

# load audio file
sampling_rate, audio_full = au.load_audio(
Expand Down

0 comments on commit 039c002

Please sign in to comment.