From 64d3fbd5cfeba19954e04c32422967ee446e794d Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 16 Nov 2020 10:41:32 -0800 Subject: [PATCH] fix mypy by correcting the __lt__ annotation --- pre_commit_hooks/requirements_txt_fixer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit_hooks/requirements_txt_fixer.py b/pre_commit_hooks/requirements_txt_fixer.py index 78103a1..2412633 100644 --- a/pre_commit_hooks/requirements_txt_fixer.py +++ b/pre_commit_hooks/requirements_txt_fixer.py @@ -36,7 +36,7 @@ class Requirement: return name[:m.start()] - def __lt__(self, requirement: 'Requirement') -> int: + def __lt__(self, requirement: 'Requirement') -> bool: # \n means top of file comment, so always return True, # otherwise just do a string comparison with value. assert self.value is not None, self.value