mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 04:51:51 +00:00
Removing .items()
This commit is contained in:
parent
7a2c3374ca
commit
a67380c500
2 changed files with 4 additions and 2 deletions
|
@ -26,7 +26,9 @@ disable =
|
|||
consider-using-f-string,
|
||||
unspecified-encoding,
|
||||
consider-iterating-dictionary,
|
||||
inconsistent-return-statements
|
||||
inconsistent-return-statements,
|
||||
consider-using-dict-items,
|
||||
modified-iterating-dict
|
||||
|
||||
[REPORTS]
|
||||
output-format = text
|
||||
|
|
|
@ -90,7 +90,7 @@ class User:
|
|||
percents['cpu'] = round(self.usage['cpu'] / self.limits['cpu'] * 100)
|
||||
percents['mem'] = round(self.usage['mem'] / self.limits['mem'] * 100)
|
||||
percents['disk'] = round(self.usage['disk'] / self.limits['disk'] * 100)
|
||||
for resource in percents.items():
|
||||
for resource in percents:
|
||||
if percents[resource] > 100:
|
||||
percents[resource] = 100
|
||||
return percents
|
||||
|
|
Loading…
Reference in a new issue