Skip to content

Commit 963383f

Browse files
author
cuadradot
committed
style: Standardize string literal quotes in Literal type hints and remove unused Literal import.
1 parent a95fdd2 commit 963383f

5 files changed

Lines changed: 78 additions & 78 deletions

File tree

src/earthkit/climate/indicators/precipitation.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def days_over_precip_doy_thresh(
409409
thresh: Any = "1 mm/day",
410410
freq: str = "YS",
411411
bootstrap: bool = False,
412-
op: Literal['>', '>=', 'gt', 'ge'] = ">",
412+
op: Literal[">", ">=", "gt", "ge"] = ">",
413413
**kwargs: Any,
414414
) -> Any:
415415
"""
@@ -477,7 +477,7 @@ def days_over_precip_thresh(
477477
thresh: Any = "1 mm/day",
478478
freq: str = "YS",
479479
bootstrap: bool = False,
480-
op: Literal['>', '>=', 'gt', 'ge'] = ">",
480+
op: Literal[">", ">=", "gt", "ge"] = ">",
481481
**kwargs: Any,
482482
) -> Any:
483483
"""
@@ -818,7 +818,7 @@ def dry_days(
818818
*,
819819
thresh: Any = "0.2 mm/d",
820820
freq: str = "YS",
821-
op: Literal['<', 'lt', '<=', 'le'] = "<",
821+
op: Literal["<", "lt", "<=", "le"] = "<",
822822
**kwargs: Any,
823823
) -> Any:
824824
"""
@@ -873,7 +873,7 @@ def dry_spell_frequency(
873873
window: int = 3,
874874
freq: str = "YS",
875875
resample_before_rl: bool = True,
876-
op: Literal['sum', 'max', 'min', 'mean'] = "sum",
876+
op: Literal["sum", "max", "min", "mean"] = "sum",
877877
**kwargs: Any,
878878
) -> Any:
879879
"""
@@ -939,7 +939,7 @@ def dry_spell_max_length(
939939
*,
940940
thresh: Any = "1.0 mm",
941941
window: int = 1,
942-
op: Literal['max', 'sum'] = "sum",
942+
op: Literal["max", "sum"] = "sum",
943943
freq: str = "YS",
944944
resample_before_rl: bool = True,
945945
**kwargs: Any,
@@ -1002,7 +1002,7 @@ def dry_spell_total_length(
10021002
*,
10031003
thresh: Any = "1.0 mm",
10041004
window: int = 3,
1005-
op: Literal['sum', 'max', 'min', 'mean'] = "sum",
1005+
op: Literal["sum", "max", "min", "mean"] = "sum",
10061006
freq: str = "YS",
10071007
resample_before_rl: bool = True,
10081008
**kwargs: Any,
@@ -1070,7 +1070,7 @@ def dryness_index(
10701070
ds: xarray.Dataset | Any = None,
10711071
*,
10721072
wo: Any = "200 mm",
1073-
freq: Literal['YS', 'YS-JAN'] = "YS",
1073+
freq: Literal["YS", "YS-JAN"] = "YS",
10741074
**kwargs: Any,
10751075
) -> Any:
10761076
"""
@@ -1243,7 +1243,7 @@ def fraction_over_precip_doy_thresh(
12431243
thresh: Any = "1 mm/day",
12441244
freq: str = "YS",
12451245
bootstrap: bool = False,
1246-
op: Literal['>', '>=', 'gt', 'ge'] = ">",
1246+
op: Literal[">", ">=", "gt", "ge"] = ">",
12471247
**kwargs: Any,
12481248
) -> Any:
12491249
"""
@@ -1312,7 +1312,7 @@ def fraction_over_precip_thresh(
13121312
thresh: Any = "1 mm/day",
13131313
freq: str = "YS",
13141314
bootstrap: bool = False,
1315-
op: Literal['>', '>=', 'gt', 'ge'] = ">",
1315+
op: Literal[">", ">=", "gt", "ge"] = ">",
13161316
**kwargs: Any,
13171317
) -> Any:
13181318
"""
@@ -2086,7 +2086,7 @@ def rprctot(
20862086
*,
20872087
thresh: Any = "1.0 mm/day",
20882088
freq: str = "YS",
2089-
op: Literal['>', 'gt', '>=', 'ge'] = ">=",
2089+
op: Literal[">", "gt", ">=", "ge"] = ">=",
20902090
**kwargs: Any,
20912091
) -> Any:
20922092
"""
@@ -2188,7 +2188,7 @@ def daily_pr_intensity(
21882188
*,
21892189
thresh: Any = "1 mm/day",
21902190
freq: str = "YS",
2191-
op: Literal['>', 'gt', '>=', 'ge'] = ">=",
2191+
op: Literal[">", "gt", ">=", "ge"] = ">=",
21922192
**kwargs: Any,
21932193
) -> Any:
21942194
"""
@@ -2848,7 +2848,7 @@ def wet_spell_frequency(
28482848
window: int = 3,
28492849
freq: str = "YS",
28502850
resample_before_rl: bool = True,
2851-
op: Literal['sum', 'min', 'max', 'mean'] = "sum",
2851+
op: Literal["sum", "min", "max", "mean"] = "sum",
28522852
**kwargs: Any,
28532853
) -> Any:
28542854
"""
@@ -2915,7 +2915,7 @@ def wet_spell_max_length(
29152915
*,
29162916
thresh: Any = "1.0 mm",
29172917
window: int = 1,
2918-
op: Literal['min', 'sum', 'max', 'mean'] = "sum",
2918+
op: Literal["min", "sum", "max", "mean"] = "sum",
29192919
freq: str = "YS",
29202920
resample_before_rl: bool = True,
29212921
**kwargs: Any,
@@ -2982,7 +2982,7 @@ def wet_spell_total_length(
29822982
*,
29832983
thresh: Any = "1.0 mm",
29842984
window: int = 3,
2985-
op: Literal['min', 'sum', 'max', 'mean'] = "sum",
2985+
op: Literal["min", "sum", "max", "mean"] = "sum",
29862986
freq: str = "YS",
29872987
resample_before_rl: bool = True,
29882988
**kwargs: Any,
@@ -3049,7 +3049,7 @@ def wetdays(
30493049
*,
30503050
thresh: Any = "1.0 mm/day",
30513051
freq: str = "YS",
3052-
op: Literal['>', 'gt', '>=', 'ge'] = ">=",
3052+
op: Literal[">", "gt", ">=", "ge"] = ">=",
30533053
**kwargs: Any,
30543054
) -> Any:
30553055
"""
@@ -3102,7 +3102,7 @@ def wetdays_prop(
31023102
*,
31033103
thresh: Any = "1.0 mm/day",
31043104
freq: str = "YS",
3105-
op: Literal['>', 'gt', '>=', 'ge'] = ">=",
3105+
op: Literal[">", "gt", ">=", "ge"] = ">=",
31063106
**kwargs: Any,
31073107
) -> Any:
31083108
"""

src/earthkit/climate/indicators/synoptic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
"""Synoptic indices."""
1010

11-
from typing import Any, Literal
11+
from typing import Any
1212

1313
import xarray
1414
import xclim.indicators.atmos

0 commit comments

Comments
 (0)