mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 22:04:17 +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)),
|
(g for g in self.style_guides if g.applies_to(filename)),
|
||||||
key=lambda g: len(g.filename or ""),
|
key=lambda g: len(g.filename or ""),
|
||||||
)
|
)
|
||||||
if len(guides) > 1:
|
return guides[-1]
|
||||||
return guides[-1]
|
|
||||||
return guides[0]
|
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def processing_file(self, filename):
|
def processing_file(self, filename):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue