From 8cb7f6453ac27ca1c61eb0e50cc487ab8dedf1cf Mon Sep 17 00:00:00 2001 From: cclauss Date: Thu, 12 Apr 2018 21:28:27 +0200 Subject: [PATCH] import curses, re in omp/omp.py flake8 testing of https://github.com/McSinyx/comp on Python 3.6.3 This PR fixes 4 of the 6 reported _missing names_... $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` ./omp/omp.py:73:22: F821 undefined name 'Comp' self = super(Comp, cls).__new__(cls) ^ ./omp/omp.py:120:67: F821 undefined name 'value' _("Failed to multiply '{}' with {}").format(name, value), ^ ./omp/omp.py:183:13: F821 undefined name 're' p = re.compile(self.gets('/'), re.IGNORECASE) ^ ./omp/omp.py:183:40: F821 undefined name 're' p = re.compile(self.gets('/'), re.IGNORECASE) ^ ./omp/omp.py:192:56: F821 undefined name 'curses' self.update_status(_("Pattern not found"), curses.color_pair(1)) ^ ./omp/omp.py:200:56: F821 undefined name 'curses' self.update_status(_("Pattern not found"), curses.color_pair(1)) ^ 6 F821 undefined name 'Comp' 6 ``` --- omp/omp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/omp/omp.py b/omp/omp.py index 3b971b3..7d3f036 100644 --- a/omp/omp.py +++ b/omp/omp.py @@ -16,7 +16,9 @@ # # Copyright (C) 2017 Nguyễn Gia Phong +import curses import json +import re from bisect import bisect_left as bisect from collections import deque from gettext import bindtextdomain, gettext as _, textdomain