File tree Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ jobs:
26
26
- name : Run ruff (black)
27
27
# Do not attempt to install the default dependencies, this is much faster.
28
28
# Run temporarily on a sub directory before the main restyling.
29
- run : uv run --no-project --with "ruff==0.9.7 " ruff format --target-version py312 --check -n src/ scripts/
29
+ run : uv run --no-project --with "ruff==0.12.2 " ruff format --target-version py312 --check -n src/ scripts/
30
30
31
31
- name : Run ruff (flake8)
32
32
# Do not attempt to install the default dependencies, this is much faster.
33
- run : uv run --no-project --with "ruff==0.9.7 " ruff check src/
33
+ run : uv run --no-project --verbose -- with "ruff==0.12.2 " ruff check src/
34
34
pr :
35
35
name : PR checks
36
36
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ authors = [
7
7
{ name = " WeatherGenerator collaboration" }
8
8
]
9
9
10
- requires-python = " >=3.11 ,<3.13"
10
+ requires-python = " >=3.12 ,<3.13"
11
11
# TODO: split the plotting dependencies into their own dep groups, they are not required.
12
12
dependencies = [
13
13
' torch==2.6.0' ,
@@ -99,7 +99,6 @@ ignore = [
99
99
" SIM118" ,
100
100
" SIM102" ,
101
101
" SIM401" ,
102
- " UP040" , # TODO: enable later
103
102
# To ignore, not relevant for us
104
103
" SIM108" # in case additional norm layer supports are added in future
105
104
]
Original file line number Diff line number Diff line change 11
11
import logging
12
12
from abc import abstractmethod
13
13
from dataclasses import dataclass
14
- from typing import TypeAlias
15
14
16
15
import numpy as np
17
16
from numpy import datetime64 , timedelta64
22
21
_logger = logging .getLogger (__name__ )
23
22
24
23
# The numpy date time 64 time (nanosecond precision)
25
- NPDT64 : TypeAlias = datetime64
24
+ type NPDT64 = datetime64
26
25
# The numpy delta time 64 time (nanosecond precision)
27
- NPTDel64 : TypeAlias = timedelta64
26
+ type NPTDel64 = timedelta64
28
27
29
- DType : TypeAlias = np .float32 # The type for the data in the datasets.
28
+ type DType = np .float32 # The type for the data in the datasets.
30
29
31
30
"""
32
31
The type for indexing into datasets. It is a multiple of hours.
33
32
"""
34
- TIndex : TypeAlias = np .int64
33
+ type TIndex = np .int64
35
34
36
35
37
36
_DT_ZERO = np .datetime64 ("1850-01-01T00:00" )
Original file line number Diff line number Diff line change 10
10
11
11
from abc import ABCMeta as NativeABCMeta
12
12
from collections .abc import Callable
13
- from typing import Any , TypeVar , cast
14
-
15
- R = TypeVar ("R" )
13
+ from typing import Any , cast
16
14
17
15
18
16
class DummyAttribute :
19
17
pass
20
18
21
19
22
- def abstract_attribute (obj : Callable [[Any ], R ] | None = None ) -> R :
20
+ def abstract_attribute [ R ] (obj : Callable [[Any ], R ] | None = None ) -> R :
23
21
_obj = cast (Any , obj )
24
22
if obj is None :
25
23
_obj = DummyAttribute ()
You can’t perform that action at this time.
0 commit comments