Run flake8 for general code and style cleanup
This commit is contained in:
parent
e60972fc73
commit
8dae78c735
@ -10,11 +10,8 @@ Dependencies
|
|||||||
|
|
||||||
# Module Imports
|
# Module Imports
|
||||||
import argparse
|
import argparse
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
import file_scripts.fzf as fzf
|
import file_scripts.fzf as fzf
|
||||||
import file_scripts.editor as editor
|
|
||||||
import file_scripts.search as search
|
import file_scripts.search as search
|
||||||
import file_scripts.error as error
|
import file_scripts.error as error
|
||||||
|
|
||||||
@ -36,7 +33,7 @@ E_TEMP_DIR_NON_EXIST = 1
|
|||||||
# ========== Main Script ==========
|
# ========== Main Script ==========
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if platform == "win32":
|
if platform == "win32":
|
||||||
sys.exit(error.E_INTERRUPT)
|
exit(error.E_INTERRUPT)
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
@ -29,7 +29,7 @@ ETC_DIR = "/etc"
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# This script doesn't support Windows
|
# This script doesn't support Windows
|
||||||
if platform == "win32":
|
if platform == "win32":
|
||||||
sys.exit(error.E_INTERRUPT)
|
exit(error.E_INTERRUPT)
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
@ -141,7 +141,7 @@ if __name__ == "__main__":
|
|||||||
files = sorted(files)
|
files = sorted(files)
|
||||||
|
|
||||||
if files == []:
|
if files == []:
|
||||||
print(f"No results found, exiting")
|
print("No results found, exiting")
|
||||||
exit(error.E_NO_RESULTS)
|
exit(error.E_NO_RESULTS)
|
||||||
|
|
||||||
# Pretty print all filenames
|
# Pretty print all filenames
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
class FileScripts < Formula
|
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"
|
homepage "https://github.com/etorres4/file-scripts"
|
||||||
url "https://github.com/etorres4/file-scripts",
|
url "https://github.com/etorres4/file-scripts", :using => :git
|
||||||
:using => :git
|
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
sha256 "1124f0fabb45341a0daf6ca1f6fc9f7aa13bc921bd2fe25bd6e9744829c7fc96"
|
sha256 "1124f0fabb45341a0daf6ca1f6fc9f7aa13bc921bd2fe25bd6e9744829c7fc96"
|
||||||
|
|
||||||
depends_on "python@3.10"
|
|
||||||
depends_on "fd"
|
depends_on "fd"
|
||||||
depends_on "fzf"
|
depends_on "fzf"
|
||||||
|
depends_on "python@3.10"
|
||||||
|
|
||||||
def install
|
def install
|
||||||
system Formula["python@3.10"].opt_bin/"python3", *Language::Python.setup_install_args(prefix)
|
system Formula["python@3.10"].opt_bin/"python3", *Language::Python.setup_install_args(prefix)
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import file_scripts.error as error
|
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@ -41,7 +40,7 @@ class FZFError(Exception):
|
|||||||
return f"FZFError({self.exit_code})"
|
return f"FZFError({self.exit_code})"
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(__repr__)
|
return str(self.__repr__())
|
||||||
|
|
||||||
|
|
||||||
# ========== Functions ==========
|
# ========== Functions ==========
|
||||||
|
Loading…
x
Reference in New Issue
Block a user