~callum/barszcz

eb88de5b5666df413881b7c0c354798a48f8a99f — Callum Brown 1 year, 10 months ago 2742600
Rename Barszcz.list() to Barszcz.ls()

list is a keyword in Python, avoid confusion I guess
1 files changed, 4 insertions(+), 4 deletions(-)

M beetsplug/barszcz.py
M beetsplug/barszcz.py => beetsplug/barszcz.py +4 -4
@@ 407,7 407,7 @@ class Barszcz:
    def quit_barszcz(self):
        self.running = False

    def list(self, query, albums=True, items=True):
    def ls(self, query, albums=True, items=True):
        """List Albums and Items matching the beets query.

        Albums are listed first.


@@ 503,15 503,15 @@ class Barszcz:
            return self.focus(index)

        elif split[0] in ("list", "ls"):
            return self.list(" ".join(split[1:]))
            return self.ls(" ".join(split[1:]))

        elif split[0] in ("lista", "lsa"):
            # List only albums
            return self.list(" ".join(split[1:]), items=False)
            return self.ls(" ".join(split[1:]), items=False)

        elif split[0] in ("listi", "lsi"):
            # List only items
            return self.list(" ".join(split[1:]), albums=False)
            return self.ls(" ".join(split[1:]), albums=False)

        else:
            return f"Unrecognised command '{split[0]}'"