diff --git a/bin/cptemplate b/bin/cptemplate index d5d9e87..e102b2f 100755 --- a/bin/cptemplate +++ b/bin/cptemplate @@ -10,11 +10,8 @@ Dependencies # Module Imports import argparse -import shutil -import subprocess import file_scripts.fzf as fzf -import file_scripts.editor as editor import file_scripts.search as search import file_scripts.error as error @@ -36,7 +33,7 @@ E_TEMP_DIR_NON_EXIST = 1 # ========== Main Script ========== if __name__ == "__main__": if platform == "win32": - sys.exit(error.E_INTERRUPT) + exit(error.E_INTERRUPT) parser = argparse.ArgumentParser() parser.add_argument( diff --git a/bin/fedit b/bin/fedit index b245eca..7735545 100755 --- a/bin/fedit +++ b/bin/fedit @@ -29,7 +29,7 @@ ETC_DIR = "/etc" if __name__ == "__main__": # This script doesn't support Windows if platform == "win32": - sys.exit(error.E_INTERRUPT) + exit(error.E_INTERRUPT) parser = argparse.ArgumentParser() parser.add_argument( diff --git a/bin/quickdel b/bin/quickdel index 3c21076..c6474eb 100755 --- a/bin/quickdel +++ b/bin/quickdel @@ -141,7 +141,7 @@ if __name__ == "__main__": files = sorted(files) if files == []: - print(f"No results found, exiting") + print("No results found, exiting") exit(error.E_NO_RESULTS) # Pretty print all filenames diff --git a/file-scripts.rb b/file-scripts.rb index 51a0e57..8ea9394 100644 --- a/file-scripts.rb +++ b/file-scripts.rb @@ -1,14 +1,13 @@ class FileScripts < Formula - desc "Various scripts for performing file-related operations such as editing and deleting" + desc "Various scripts for performing file-related operations" homepage "https://github.com/etorres4/file-scripts" - url "https://github.com/etorres4/file-scripts", - :using => :git + url "https://github.com/etorres4/file-scripts", :using => :git version "1.0.1" sha256 "1124f0fabb45341a0daf6ca1f6fc9f7aa13bc921bd2fe25bd6e9744829c7fc96" - depends_on "python@3.10" depends_on "fd" depends_on "fzf" + depends_on "python@3.10" def install system Formula["python@3.10"].opt_bin/"python3", *Language::Python.setup_install_args(prefix) diff --git a/file_scripts/fzf.py b/file_scripts/fzf.py index e8b0b30..905a896 100644 --- a/file_scripts/fzf.py +++ b/file_scripts/fzf.py @@ -7,7 +7,6 @@ import shutil import subprocess -import file_scripts.error as error from pathlib import Path @@ -41,7 +40,7 @@ class FZFError(Exception): return f"FZFError({self.exit_code})" def __str__(self): - return str(__repr__) + return str(self.__repr__()) # ========== Functions ==========