MNT: simplify logic to select correct style guide

This commit is contained in:
Thomas A Caswell 2018-11-03 22:50:35 -04:00
parent b723756c2d
commit 4d7bd088e1
No known key found for this signature in database
GPG key ID: BCD928050D713D75

View file

@ -371,9 +371,7 @@ class StyleGuideManager(object):
(g for g in self.style_guides if g.applies_to(filename)),
key=lambda g: len(g.filename or ""),
)
if len(guides) > 1:
return guides[-1]
return guides[0]
return guides[-1]
@contextlib.contextmanager
def processing_file(self, filename):