Skip to content

Commit d10b4bd

Browse files
committed
Reformat file with Ruff
1 parent 80d0761 commit d10b4bd

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

glances/plugins/system/__init__.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,9 @@ def get_win_version_and_platform(self, stats):
163163
os_version = platform.win32_ver()
164164
# if the python version is 32 bit perhaps the windows operating
165165
# system is 64bit
166-
conditions = [
167-
stats['platform'] == '32bit',
168-
'PROCESSOR_ARCHITEW6432' in os.environ
169-
]
166+
conditions = [stats['platform'] == '32bit', 'PROCESSOR_ARCHITEW6432' in os.environ]
170167

171-
return {
172-
'os_version' : ' '.join(os_version[::2]),
173-
'platform' : '64bit' if all(conditions) else stats['platform']
174-
}
168+
return {'os_version': ' '.join(os_version[::2]), 'platform': '64bit' if all(conditions) else stats['platform']}
175169

176170
def get_linux_version_and_distro(self):
177171
try:
@@ -184,10 +178,7 @@ def get_linux_version_and_distro(self):
184178
else:
185179
distro = ' '.join(linux_distro[:2])
186180

187-
return {
188-
'os_version' : platform.release(),
189-
'linux_distro' : distro
190-
}
181+
return {'os_version': platform.release(), 'linux_distro': distro}
191182

192183
def get_stats_from_std_sys_lib(self, stats):
193184
stats['os_name'] = platform.system()

glances/plugins/vms/engines/multipass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class VmExtension:
3131

3232
def __init__(self):
3333
if import_multipass_error_tag:
34-
raise Exception(f"Multipass binary ({MULTIPASS_PATH})is mandatory to get Vm stats")
34+
raise Exception(f"Multipass binary ({MULTIPASS_PATH}) is mandatory to get VM stats")
3535

3636
self.ext_name = "Multipass (Vm)"
3737

0 commit comments

Comments
 (0)