From dfbbeab8db856e6b95d2aeda3fdb2b5a67481b48 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 4 Mar 2019 12:25:54 +1000 Subject: [PATCH] pylint is confused by pyqt subscript notation --- tools/build_ui.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/build_ui.sh b/tools/build_ui.sh index 52a8b46b0..a8f44dabd 100755 --- a/tools/build_ui.sh +++ b/tools/build_ui.sh @@ -28,9 +28,11 @@ do if [ $i -nt $py ]; then echo " * "$py pyuic5 --from-imports $i -o $py.tmp - # munge the output to use gettext - cat $py.tmp | sed "/WARNING/ a\\ -from anki.lang import _" | perl -p -e 's/(QtGui\.QApplication\.)?_?translate\(".*?", /_(/; s/, None.*/))/' > $py + (cat < $py +# -*- coding: utf-8 -*- +# pylint: disable=unsubscriptable-object +from anki.lang import _ +EOF rm $py.tmp fi done