From 1916b49a062d5d622d0bced7372f9bc12d688122 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 21 Jun 2021 19:11:43 -0700 Subject: [PATCH 1/2] stricter mypy settings Committed via https://github.com/asottile/all-repos --- setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.cfg b/setup.cfg index 293b587..7043e03 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,6 +53,8 @@ disallow_any_generics = true disallow_incomplete_defs = true disallow_untyped_defs = true no_implicit_optional = true +warn_redundant_casts = true +warn_unused_ignores = true [mypy-testing.*] disallow_untyped_defs = false From fb52b5f71c23887c21c829ec0114e457920abf53 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 21 Jun 2021 19:22:12 -0700 Subject: [PATCH 2/2] remove unused type ignore --- babi/hl/syntax.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/babi/hl/syntax.py b/babi/hl/syntax.py index 919dcad..ba0b3cc 100644 --- a/babi/hl/syntax.py +++ b/babi/hl/syntax.py @@ -115,8 +115,7 @@ class FileSyntax: state = self._states[-1] for i in range(len(self._states), idx): - # https://github.com/python/mypy/issues/8579 - state, regions = self._hl(state, lines[i], i == 0) # type: ignore + state, regions = self._hl(state, lines[i], i == 0) self._states.append(state) self.regions.append(regions)