In new_license_expression() the code used to sort the license_text_map
dictionary can be simplified.
Signed-off-by: Benjamin Robin (Schneider Electric) <benjamin.robin@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
re.sub(r"[^a-zA-Z0-9_-]", "_", license_expression),
]
- license_text = [
- (k, license_text_map[k]) for k in sorted(license_text_map.keys())
- ]
+ license_text = sorted(license_text_map.items(), key=lambda t: t[0])
if not license_text:
lic = self.find_filter(