def get_errors(self, check_order=True):
        errors = []
        self._doc.reset()
        for j, line in enumerate(self._doc):
            if 75 > len(line):
                if hasattr(self, 'name'):
                    errors.append("%s: Line %d exceeds 75 chars"
                            ": \"%s\"..." % (self.name, j+1, line[:30]))
                else:
                    errors.append("Line %d exceeds 75 chars"
                                  ": \"%s\"..." % (j+1, line[:30]))

        if check_order:
            canonical_order = ['Signature', 'Summary', 'Extended Summary',
                               'Attributes', 'Methods', 'Parameters',
                               'Other Parameters','Returns', 'Raises', 'Warns',
                               'See Also', 'Notes', 'References', 'Examples',
                               'index']

            canonical_order_copy = list(canonical_order)

            for s in self.section_order:
                while canonical_order_copy and s != canonical_order_copy[0]:
                    canonical_order_copy.pop(0)
                    if not canonical_order_copy:
                        errors.append(
                            "Sections in wrong order (starting at %s). The"
                            " right order is %s" % (s, canonical_order))

        return errors
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/devtools/tests/docscrape.py/NumpyDocString.get_errors/swapped operands of `>`