Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/iluvcapra/mw
Browse files Browse the repository at this point in the history
  • Loading branch information
iluvcapra committed Jan 26, 2024
2 parents 1d09adc + ce75fcd commit afff164
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
4 changes: 0 additions & 4 deletions data/share/man/man1/mw.1
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ Prints a list of all command keywords
recognizes, along with a brief description. Keywords that accept arguments
are followed by their arguments in
.IR [brackets] .
.IP license
Prints
.BR mw 's
license.
.IP show
Prints a text graphic of the sound presently at the top of the editor stack.
This include a waveform bargraph of the sound's amplitiude with respect to
Expand Down
7 changes: 0 additions & 7 deletions mw/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ def __init__(self):
readline.set_completer(completer)
readline.parse_and_bind("tab: complete")

def license(self) -> str:
module_dir = list(split(__file__)[:-2])
license_path_list = module_dir + ["LICENSE"]
license_path = join(*license_path_list)
with open(license_path) as f:
return f.read()

def get_input(self):
selection = []

Expand Down
6 changes: 3 additions & 3 deletions mw/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ def help(self, _ : 'mw.app.App'):
pnames = "[" + ",".join(pnames) + "]"
print(f"{f} {pnames}".ljust(15) + f": {m.__doc__}")

def license(self, app: 'mw.app.App'):
"Print the license"
print(app.license())
# def license(self, app: 'mw.app.App'):
# "Print the license"
# print(app.license())

def stack(self, app: 'mw.app.App'):
"Print the stack"
Expand Down
6 changes: 3 additions & 3 deletions test/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def tearDown(self) -> None:
self.mock_app.stack.reset_mock()
return super().tearDown()

def test_license(self):
self.command_handler.license(self.mock_app)
self.mock_app.license.assert_called()
# def test_license(self):
# self.command_handler.license(self.mock_app)
# self.mock_app.license.assert_called()

def test_help(self):
self.command_handler.help(self.mock_app)
Expand Down

0 comments on commit afff164

Please sign in to comment.