mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 13:36:54 +00:00
MNT: simplify logic to select correct style guide
This commit is contained in:
parent
b723756c2d
commit
4d7bd088e1
1 changed files with 1 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue