1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

format python code with black

This commit is contained in:
catborise 2022-11-02 08:54:35 +03:00
parent ea409ca863
commit 217e106c8b
55 changed files with 2510 additions and 1454 deletions

View file

@ -8,11 +8,11 @@ from vrtManager.hostdetails import wvmHostDetails
class Compute(Model):
name = CharField(_('name'), max_length=64, unique=True)
hostname = CharField(_('hostname'), max_length=64)
login = CharField(_('login'), max_length=20)
password = CharField(_('password'), max_length=14, blank=True, null=True)
details = CharField(_('details'), max_length=64, null=True, blank=True)
name = CharField(_("name"), max_length=64, unique=True)
hostname = CharField(_("hostname"), max_length=64)
login = CharField(_("login"), max_length=20)
password = CharField(_("password"), max_length=14, blank=True, null=True)
details = CharField(_("details"), max_length=64, null=True, blank=True)
type = IntegerField()
@cached_property
@ -55,7 +55,7 @@ class Compute(Model):
@cached_property
def ram_usage(self):
return self.proxy.get_memory_usage()['percent']
return self.proxy.get_memory_usage()["percent"]
def __str__(self):
return self.name