From 77e12933fdd2962b5e37969159948621cc5ef245 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 22 Feb 2025 20:34:26 +0100 Subject: [PATCH] lint --- sync.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/sync.py b/sync.py index 414b91a..b7f98d7 100755 --- a/sync.py +++ b/sync.py @@ -4,8 +4,7 @@ import os import subprocess from logging import log from pathlib import Path - -import pubnix +from pubnix import PubNix ARGS = [ { @@ -19,10 +18,8 @@ ARGS = [ {"dn": "dimension.sh", "sub": True}, {"dn": "envs.net", "sub": True}, {"dn": "freeshell.de", "sub": False}, - # {'dn':'hextilde.xyz', 'sub': True}, {"dn": "insomnia247.nl", "dir": True, "sub": True}, {"dn": "p.projectsegfau.lt", "sub": True}, - # {'dn':'pubnix.pink', 'web': 'sites', 'sub': False}, {"dn": "rawtext.club", "sub": False}, {"dn": "rw.rs", "sub": False}, {"dn": "thunix.net", "sub": False}, @@ -36,22 +33,16 @@ ARGS = [ {"dn": "tilde.pink", "sub": False}, {"dn": "tilde.team", "sub": True}, {"dn": "tilde.town", "sub": False}, - # {'dn':'trash.town', 'sub': False}, - # permissions - # {'dn':'sdf.org', 'root': 'html', 'sub': True}, # old {"dn": "fr.tild3.org", "sub": True}, {"dn": "remotes.club", "port": 9022, "root": "web", "sub": True}, {"dn": "squiggle.city", "sub": False}, - # down - # {'dn':'aussies.space', 'sub': False}, - # {'dn':'heathens.club', 'root': 'www', 'sub': False}, - # {'dn':'vern.cc', 'sub': True}, ] -PUBNIXES = [pubnix.PubNix(**args) for args in ARGS] +PUBNIXES = [PubNix(**args) for args in ARGS] -def sync(root, pubnix, exclude=None): +def sync(root: str, pubnix: PubNix, exclude: list[str] | None = None) -> None: + """Synchronize local root directory with pubnix.""" args = [ "rsync", "--archive",