def scroll(self, up):
        """Scroll paths along the bookmark objects.

        up (boolean)
            indicates whether the orientation of the
            scrolling is up (True) or not.
        """
        ### if there's no bookmarks, then there's also no
        ### point in scrolling through bookmark paths, so
        ### exit the method earlier by returning
        if not self.existing_bookmarks:
            return

        ### otherwise, check the need to scroll depending
        ### on the direction of the scrolling and associated
        ### pre-condition

        if up:

            ## if the first bookmark path is present in the
            ## first bookmark object, there's no point in
            ## scrolling up, so we just return

            if self.bookmark_objs[0].path == self.existing_bookmarks[0]:
                return

            ## otherwise we define a amount to rotate the
            ## deque according to direction of the scrolling
            rotation_amount = 1

        else:

            ## if the path in the last bookmark object is
            ## also the last bookmark path or None, there's
            ## no point in scrolling down, so we just return

            last_path = self.bookmark_objs[-1].path

            if last_path == self.existing_bookmarks[-1] or last_path is None:
                return

            ## otherwise we define an amount to rotate the
            ## deque according to direction of the scrolling
            rotation_amount = -1

        ### rotate the bookmark paths deque by the defined
        ### amount
        self.bookmark_paths_deque.rotate(rotation_amount)

        ### and finally assign the paths to the bookmark
        ### path objects and update their appearance

        self.update_bookmark_objs_paths()
        self.update_bookmark_objs_appearance()
Scroll paths along the bookmark objects.

        up (boolean)
            indicates whether the orientation of the
            scrolling is up (True) or not.
        
nodezator/fileman/bookmarkpanel/main.py