<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def methods(self) -> 'PrettyDir': """Returns all methods of the inspected object. Note that "methods" can mean "functions" when inspecting a module. """

        return PrettyDir(
            self.obj,
            [
                pattr
                for pattr in self.pattrs
                if category_match(pattr.category, AttrCategory.FUNCTION)
            ],
        )