mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 04:37:44 +08:00
Opt: Reformat codes using Black
goodbye autopep8
This commit is contained in:
@@ -22,12 +22,12 @@ def poor_yaml_write_with_lock(data, file, template_file=DEPLOY_TEMPLATE):
|
||||
|
||||
|
||||
class WebuiConfig:
|
||||
Language = 'zh-CN'
|
||||
WebuiHost = '0.0.0.0'
|
||||
Language = "zh-CN"
|
||||
WebuiHost = "0.0.0.0"
|
||||
WebuiPort = 22267
|
||||
Theme = 'default'
|
||||
Theme = "default"
|
||||
Password = None
|
||||
CDN = 'false'
|
||||
CDN = "false"
|
||||
|
||||
def __init__(self, file=DEPLOY_CONFIG):
|
||||
"""
|
||||
@@ -68,10 +68,10 @@ class WebuiConfig:
|
||||
@staticmethod
|
||||
def to_bool(value):
|
||||
value = value.lower()
|
||||
if value == 'null' or value == 'false' or value == '':
|
||||
if value == "null" or value == "false" or value == "":
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def bool(self, key):
|
||||
"""
|
||||
Args:
|
||||
@@ -80,4 +80,4 @@ class WebuiConfig:
|
||||
Returns:
|
||||
bool: Option is ON or OFF.
|
||||
"""
|
||||
return self.to_bool(self.config[key])
|
||||
return self.to_bool(self.config[key])
|
||||
|
||||
Reference in New Issue
Block a user