def poll(self):
        """Scans the mailbox for new messages

        Returns
        =======
        A string representing the current mailbox state
        """
        state = {}

        def to_maildir_fmt(paths):
            for path in iter(paths):
                yield path.rsplit(":")[0]

        for subFolder in self.subFolders:
            path = os.path.join(self.maildirPath, subFolder["path"])
            maildir = mailbox.Maildir(path)
            state[subFolder["label"]] = 0

            for file in to_maildir_fmt(os.listdir(os.path.join(path, "new"))):
                if maildir in file:
                    state[subFolder["label"]] += 1

        return self.format_text(state)
dataset/ETHPy150Open qtile/qtile/libqtile/widget/maildir.py/Maildir.poll/swapped operands of `in`