diff --git a/sync.py b/sync.py index be6d68a..7f3f51e 100644 --- a/sync.py +++ b/sync.py @@ -18,7 +18,7 @@ def wait_for_input (cb: Callable[[str], T_WaitForInput_Res|None]) -> T_WaitForIn while True: _in = input() _out = cb(_in) - if _out != None: + if _out is not None: return _out def replace_env_variables(input_string): @@ -153,7 +153,7 @@ def compare_file (rootBackItem: BackupItem, relative_file_path: str|None) -> Cal if left.size != right.size: return NewerStatus.DIFFERENT return NewerStatus.SAME - if relative_file_path == None: + if relative_file_path is None: backup_item: FileStatus = FileStatus(rootBackItem.backup_dir) origin_item: FileStatus = FileStatus(rootBackItem.origin_dir) file_id: str = rootBackItem.name @@ -255,7 +255,7 @@ while True: match _in: case "y": print("continuing...") - break; + break case "n": print("Exiting") exit() diff --git a/windows_archive.ps1 b/windows_archive.ps1 deleted file mode 100644 index 2dcfcc4..0000000 --- a/windows_archive.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -$path_colorls = "$HOME/.config/colorls/" -$path_lsd = "$HOME/AppData/Roaming/lsd/" -$path_PowerShell = "$HOME/Documents/PowerShell/" -$path_neofetch = "$HOME/.config/neofetch/" -$path_oh_my_posh = "$HOME/.config/oh-my-posh/" -$path_hyfetch = "$HOME/.config/hyfetch.json" -$path_bat = "$HOME/AppData/Roaming/bat/" - -rclone sync --create-empty-src-dirs -v $path_colorls ./colorls/ -rclone sync --create-empty-src-dirs -v $path_lsd ./lsd/ -rclone sync --create-empty-src-dirs -v $path_PowerShell ./PowerShell/ --exclude 'Modules/' --exclude 'Scripts/' -rclone sync --create-empty-src-dirs -v $path_neofetch ./neofetch/ -rclone sync --create-empty-src-dirs -v $path_oh_my_posh ./oh-my-posh/ -rclone copyto -v $path_hyfetch ./hyfetch.json -rclone sync --create-empty-src-dirs -v $path_bat ./bat/ diff --git a/windows_restore.ps1 b/windows_restore.ps1 deleted file mode 100644 index e2e9387..0000000 --- a/windows_restore.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -$path_colorls = "$HOME/.config/colorls/" -$path_lsd = "$HOME/AppData/Roaming/lsd/" -$path_PowerShell = "$HOME/Documents/PowerShell/" -$path_neofetch = "$HOME/.config/neofetch/" -$path_oh_my_posh = "$HOME/.config/oh-my-posh/" -$path_hyfetch = "$HOME/.config/hyfetch.json" -$path_bat = "$HOME/AppData/Roaming/bat/" - -rclone sync --create-empty-src-dirs -v ./colorls/ $path_colorls -rclone sync --create-empty-src-dirs -v ./lsd/ $path_lsd -rclone sync --create-empty-src-dirs -v ./PowerShell/ $path_PowerShell --exclude 'Modules/' --exclude 'Scripts/' -rclone sync --create-empty-src-dirs -v ./neofetch/ $path_neofetch -rclone sync --create-empty-src-dirs -v ./oh-my-posh/ $path_oh_my_posh -rclone copyto -v ./hyfetch.json $path_hyfetch -rclone sync --create-empty-src-dirs -v ./bat/ $path_bat