def should_run(self, name: str) -> bool:
        """
        Tells whether a task given its name should run or not
        according to the current skipping rules.
        """
        return (
            not self.skip_all
            and name not in self.skip
            and not (self.skip_pre and name.startswith("pre_"))
            and not (self.skip_post and name.startswith("post_"))
        )

        Tells whether a task given its name should run or not
        according to the current skipping rules.
        
src/pdm/cli/hooks.py