Rename method
This commit is contained in:
parent
363711e052
commit
538485de52
@ -23,11 +23,11 @@ class PySheller:
|
|||||||
cmds.append(name)
|
cmds.append(name)
|
||||||
return cmds
|
return cmds
|
||||||
|
|
||||||
def get_path(self, command: str) -> str:
|
def get_file_path(self, command: str) -> str:
|
||||||
return path.join(self.__directory, f"{command}.sh")
|
return path.join(self.__directory, f"{command}.sh")
|
||||||
|
|
||||||
def parse_comments(self, command: str) -> dict:
|
def parse_comments(self, command: str) -> dict:
|
||||||
with open(self.get_path(command), "r") as cf:
|
with open(self.get_file_path(command), "r") as cf:
|
||||||
lines = cf.read().splitlines()
|
lines = cf.read().splitlines()
|
||||||
comments = [
|
comments = [
|
||||||
line.replace("#", "")
|
line.replace("#", "")
|
||||||
@ -75,7 +75,7 @@ class PySheller:
|
|||||||
args.append("")
|
args.append("")
|
||||||
else:
|
else:
|
||||||
args.append(passed_arg)
|
args.append(passed_arg)
|
||||||
call(self.get_path(command) + " " + " ".join(args), shell=True)
|
call(self.get_file_path(command) + " " + " ".join(args), shell=True)
|
||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
self.run_command(self.args.command)
|
self.run_command(self.args.command)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user