pylint is confused by pyqt subscript notation
This commit is contained in:
parent
919738a9d7
commit
dfbbeab8db
@ -28,9 +28,11 @@ do
|
|||||||
if [ $i -nt $py ]; then
|
if [ $i -nt $py ]; then
|
||||||
echo " * "$py
|
echo " * "$py
|
||||||
pyuic5 --from-imports $i -o $py.tmp
|
pyuic5 --from-imports $i -o $py.tmp
|
||||||
# munge the output to use gettext
|
(cat <<EOF; tail -n +3 $py.tmp) | perl -p -e 's/(QtGui\.QApplication\.)?_?translate\(".*?", /_(/; s/, None.*/))/' > $py
|
||||||
cat $py.tmp | sed "/WARNING/ a\\
|
# -*- coding: utf-8 -*-
|
||||||
from anki.lang import _" | perl -p -e 's/(QtGui\.QApplication\.)?_?translate\(".*?", /_(/; s/, None.*/))/' > $py
|
# pylint: disable=unsubscriptable-object
|
||||||
|
from anki.lang import _
|
||||||
|
EOF
|
||||||
rm $py.tmp
|
rm $py.tmp
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user