Skip to content

Commit 1b03f02

Browse files
fix: pre commit issue introduced by #3764 (#3786)
1 parent 59ce3e8 commit 1b03f02

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

camel/toolkits/earth_science_toolkit.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ def calculate_max_lst_by_ndvi(
15881588
nir_path: str,
15891589
lst_path: str,
15901590
ndvi_threshold: float,
1591-
mode: str = 'above'
1591+
mode: str = 'above',
15921592
):
15931593
"""
15941594
Calculate the maximum Land Surface Temperature (LST) in areas where
@@ -2694,8 +2694,8 @@ def detect_change_points(
26942694
import numpy as np
26952695
import ruptures as rpt
26962696

2697-
signal = np.asarray(signal)
2698-
algo = rpt.Pelt(model=model).fit(signal)
2697+
signal_arr = np.asarray(signal)
2698+
algo = rpt.Pelt(model=model).fit(signal_arr)
26992699
change_points = algo.predict(pen=penalty)
27002700
return [int(cp) for cp in change_points]
27012701

@@ -2884,7 +2884,7 @@ def count_spikes_from_values(
28842884
self,
28852885
values: list[float],
28862886
spike_threshold: float = 0.1,
2887-
verbose: bool = True
2887+
verbose: bool = True,
28882888
):
28892889
"""
28902890
Count the number of upward spikes in a sequence of numerical values.
@@ -2910,9 +2910,9 @@ def count_spikes_from_values(
29102910
"""
29112911
import numpy as np
29122912

2913-
values = np.array(values, dtype=np.float32)
2914-
valid_indices = ~np.isnan(values)
2915-
valid_values = values[valid_indices]
2913+
values_arr = np.array(values, dtype=np.float32)
2914+
valid_indices = ~np.isnan(values_arr)
2915+
valid_values = values_arr[valid_indices]
29162916
if len(valid_values) < 2:
29172917
if verbose:
29182918
logger.info(
@@ -4033,7 +4033,7 @@ def image_division_mean(
40334033
image_path1: str,
40344034
image_path2: str | None = None,
40354035
band1: int | None = 1,
4036-
band2: int | None = 2
4036+
band2: int | None = 2,
40374037
):
40384038
"""
40394039
Description:
@@ -5156,7 +5156,9 @@ def get_filelist(self, dir_path: str):
51565156
[_ for _ in os.listdir(dir_path) if not _.startswith('.')]
51575157
)
51585158

5159-
def radiometric_correction_sr(self, input_band_path: str, output_path: str):
5159+
def radiometric_correction_sr(
5160+
self, input_band_path: str, output_path: str
5161+
):
51605162
"""
51615163
Apply Landsat 8 surface reflectance (SR_B*) radiometric correction.
51625164

test/loaders/test_markitdown.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ def test_convert_file_conversion_error(mock_files):
101101

102102
def test_convert_files_success(mock_files):
103103
converter = MarkItDownLoader()
104-
file_paths = [mock_files["demo_html"], mock_files["demo_md"], mock_files["report_pdf"]]
104+
file_paths = [
105+
mock_files["demo_html"],
106+
mock_files["demo_md"],
107+
mock_files["report_pdf"],
108+
]
105109
results = converter.convert_files(file_paths)
106110
assert mock_files["demo_html"] in results
107111
assert mock_files["demo_md"] in results

0 commit comments

Comments
 (0)