File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -262,12 +262,14 @@ def _detect_cores():
262
262
263
263
@property
264
264
def cores (self ):
265
+ """Get the number of cores in platform."""
265
266
if self ._cores is None :
266
267
self ._cores = self ._detect_cores ()
267
268
return self ._cores
268
269
269
270
@cores .setter
270
271
def cores (self , num_of_cores ):
272
+ """Set the number of cores in platform."""
271
273
self ._cores = num_of_cores
272
274
273
275
@property
@@ -289,17 +291,17 @@ def cores_per_socket(self) -> int:
289
291
290
292
@property
291
293
def sockets (self ):
294
+ """Get the number of sockets in platform."""
292
295
if self ._sockets is None :
293
296
self ._sockets = self ._get_number_of_sockets ()
294
297
return self ._sockets
295
298
296
299
@sockets .setter
297
300
def sockets (self , num_of_sockets ):
301
+ """Set the number of sockets in platform."""
298
302
self ._sockets = num_of_sockets
299
303
300
304
def _get_number_of_sockets (self ) -> int :
301
- """Get number of sockets in platform."""
302
-
303
305
if "arch" in self ._info and "ARM" in self ._info ["arch" ]: # pragma: no cover
304
306
return 1
305
307
You can’t perform that action at this time.
0 commit comments