🎨 Format Python code with Black

This commit is contained in:
alexAubin 2024-06-24 20:38:46 +00:00 committed by github-actions[bot]
parent 2d26935079
commit 6851d740f7

View file

@ -21,14 +21,28 @@ tree = {
"title": "Databases", "title": "Databases",
"notes": "This is coupled to the 'database' resource in the manifest.toml - at least for mysql/postgresql. Mongodb/redis may have better integration in the future.", "notes": "This is coupled to the 'database' resource in the manifest.toml - at least for mysql/postgresql. Mongodb/redis may have better integration in the future.",
"subsections": ["mysql", "postgresql", "mongodb", "redis"], "subsections": ["mysql", "postgresql", "mongodb", "redis"],
}, },
"conf": { "conf": {
"title": "Configurations / templating", "title": "Configurations / templating",
"subsections": ["templating", "nginx", "php", "systemd", "fail2ban", "logrotate"], "subsections": [
"templating",
"nginx",
"php",
"systemd",
"fail2ban",
"logrotate",
],
}, },
"misc": { "misc": {
"title": "Misc tools", "title": "Misc tools",
"subsections": ["utils", "setting", "string", "backup", "logging", "multimedia"], "subsections": [
"utils",
"setting",
"string",
"backup",
"logging",
"multimedia",
],
}, },
"meh": { "meh": {
"title": "Deprecated or handled by the core / app resources since v2", "title": "Deprecated or handled by the core / app resources since v2",
@ -36,6 +50,7 @@ tree = {
}, },
} }
def get_current_commit(): def get_current_commit():
p = subprocess.Popen( p = subprocess.Popen(
"git rev-parse --verify HEAD", "git rev-parse --verify HEAD",
@ -147,7 +162,10 @@ class Parser:
# (we ignore helpers containing [internal] ...) # (we ignore helpers containing [internal] ...)
if ( if (
"[packagingv1]" not in current_block["comments"] "[packagingv1]" not in current_block["comments"]
and not any(line.startswith("[internal]") for line in current_block["comments"]) and not any(
line.startswith("[internal]")
for line in current_block["comments"]
)
and not current_block["name"].startswith("_") and not current_block["name"].startswith("_")
): ):
self.blocks.append(current_block) self.blocks.append(current_block)