ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙfrom collections import defaultdict from prospector.formatters.text import TextFormatter __all__ = ("GroupedFormatter",) class GroupedFormatter(TextFormatter): def render_messages(self): output = [ "Messages", "========", "", ] groups = defaultdict(lambda: defaultdict(list)) for message in self.messages: groups[self._make_path(message.location.path)][message.location.line].append(message) for filename in sorted(groups.keys()): output.append(str(filename)) for line in sorted(groups[filename].keys(), key=lambda x: 0 if x is None else int(x)): output.append(" Line: %s" % line) for message in groups[filename][line]: output.append( " %s: %s / %s%s" % ( message.source, message.code, message.message, (" (col %s)" % message.location.character) if message.location.character else "", ) ) output.append("") return "\n".join(output)