From 4270b56e500acf20f0de5a20fa664eabefd45353 Mon Sep 17 00:00:00 2001 From: Morgan Courbet Date: Tue, 4 Jul 2017 20:49:11 +0200 Subject: [PATCH] Refactor MixedLineDetection --- pre_commit_hooks/mixed_line_ending.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pre_commit_hooks/mixed_line_ending.py b/pre_commit_hooks/mixed_line_ending.py index ddc25eb..b136a8f 100644 --- a/pre_commit_hooks/mixed_line_ending.py +++ b/pre_commit_hooks/mixed_line_ending.py @@ -36,8 +36,8 @@ class MixedLineDetection(Enum): NOT_MIXED = False, None UNKNOWN = False, None - def __init__(self, conversion, line_ending_enum): - self.conversion = conversion + def __init__(self, mle_found, line_ending_enum): + self.mle_found = mle_found self.line_ending_enum = line_ending_enum @@ -83,7 +83,7 @@ def mixed_line_ending(argv=None): logging.debug('mixed_line_ending: detect_result = %s', detect_result) - if detect_result.conversion: + if detect_result.mle_found: le_enum = detect_result.line_ending_enum logging.info('The file %s has mixed line ending with a '