File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 5656 "types-tqdm" ,
5757 "types-setuptools" ,
5858 "pyarrow-stubs" ,
59+ "types-psutil" ,
5960 ]
6061
6162 setup_requires = ["setuptools_scm" ]
Original file line number Diff line number Diff line change @@ -942,15 +942,15 @@ def set_up_dask_client() -> None:
942942 # Determine whether or not a Dask client is already running. If not,
943943 # create a new one.
944944 try :
945- client = get_client ()
945+ get_client ()
946946 except ValueError :
947947 # No Dask client is running so we create one.
948948 from dask .distributed import LocalCluster
949949 from dask .system import CPU_COUNT
950950
951951 # extract the memory limit from the environment variable
952- cluster = LocalCluster (
952+ cluster = LocalCluster ( # type: ignore [no-untyped-call]
953953 n_workers = CPU_COUNT ,
954954 threads_per_worker = 1 ,
955955 )
956- client = cluster .get_client ()
956+ cluster .get_client () # type: ignore [no-untyped-call]
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ def test_set_up_dask_client_default() -> None:
111111
112112 set_up_dask_client ()
113113 client = get_client ()
114- workers = client .scheduler_info ()["workers" ]
114+ workers = client .scheduler_info ()["workers" ] # type: ignore[no-untyped-call]
115115 assert len (workers ) == CPU_COUNT
116116 assert all (worker ["nthreads" ] == 1 for worker in workers .values ())
117117 if is_on_slurm ():
@@ -134,13 +134,13 @@ def test_set_up_dask_client_default() -> None:
134134def test_set_up_dask_client_custom () -> None :
135135 memory_limit = 1 # gb
136136 n_workers = 3
137- cluster = LocalCluster (
137+ cluster = LocalCluster ( # type: ignore[no-untyped-call]
138138 name = "custom" ,
139139 n_workers = n_workers ,
140140 threads_per_worker = 2 ,
141141 memory_limit = memory_limit * 1024 ** 3 ,
142142 )
143- client = cluster .get_client ()
143+ client = cluster .get_client () # type: ignore[no-untyped-call]
144144 set_up_dask_client ()
145145 client = get_client ()
146146 assert client .cluster .name == "custom"
You can’t perform that action at this time.
0 commit comments