Philipp Hörist pushed to branch master at gajim / gajim
Commits:
81387ada by Philipp Hörist at 2018-09-18T14:44:23Z
Fix pylint errors
- pointless-statement
- pointless-string-statement
- unnecessary-lambda
- - - - -
457faf38 by Philipp Hörist at 2018-09-18T14:46:20Z
Update pylint error list
- Check for W0104 pointless-statement
- Check for W0105 pointless-string-statement
- Check for W0108 unnecessary-lambda
- - - - -
6 changed files:
- .gitlab-ci.yml
- gajim/common/app.py
- gajim/filetransfers_window.py
- gajim/gtk/profile.py
- gajim/gui_menu_builder.py
- scripts/dev/pre-push-tests.sh
Changes:
=====================================
.gitlab-ci.yml
=====================================
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,7 +19,7 @@ run-mypy:
run-pylint:
stage: test
script:
- - pylint3 --jobs=2
--disable=C0103,C0302,C0330,C0411,C0412,C0413,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1128,E1133,E1136,R0201,R0901,R0904,R0913,R0916,R1702,R1706,R1711,R1716,W0104,W0105,W0108,W0109,W0123,W0143,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614,W0631,W0640,W1401,W1505
gajim
+ - pylint3 --jobs=2
--disable=C0103,C0302,C0330,C0411,C0412,C0413,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1128,E1133,E1136,R0201,R0901,R0904,R0913,R0916,R1702,R1706,R1711,R1716,W0109,W0123,W0143,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614,W0631,W0640,W1401,W1505
gajim
run-build:
stage: build
=====================================
gajim/common/app.py
=====================================
--- a/gajim/common/app.py
+++ b/gajim/common/app.py
@@ -188,14 +188,12 @@ def detect_dependencies():
# python-gnupg
try:
import gnupg
- '''
- We need https://pypi.python.org/pypi/python-gnupg
- but https://pypi.python.org/pypi/gnupg shares the same package name.
- It cannot be used as a drop-in replacement.
- We test with a version check if python-gnupg is installed as it is
- on a much lower version number than gnupg
- Also we need at least python-gnupg 0.3.8
- '''
+ # We need https://pypi.python.org/pypi/python-gnupg
+ # but https://pypi.python.org/pypi/gnupg shares the same package name.
+ # It cannot be used as a drop-in replacement.
+ # We test with a version check if python-gnupg is installed as it is
+ # on a much lower version number than gnupg
+ # Also we need at least python-gnupg 0.3.8
v_gnupg = gnupg.__version__
if V(v_gnupg) < V('0.3.8') or V(v_gnupg) > V('1.0.0'):
log('gajim').info('Gajim needs python-gnupg >= 0.3.8')
=====================================
gajim/filetransfers_window.py
=====================================
--- a/gajim/filetransfers_window.py
+++ b/gajim/filetransfers_window.py
@@ -466,7 +466,7 @@ class FileTransfersWindow:
iter_ = self.get_iter_by_sid(file_props.type_, file_props.sid)
if iter_ is None:
return
- self.model[iter_][Column.SID]
+
if status == 'stop':
file_props.stopped = True
elif status == 'ok':
=====================================
gajim/gtk/profile.py
=====================================
--- a/gajim/gtk/profile.py
+++ b/gajim/gtk/profile.py
@@ -185,7 +185,7 @@ class ProfileWindow(Gtk.ApplicationWindow):
pritext,
_('Format of the date must be YYYY-MM-DD'),
transient_for=self)
- GLib.idle_add(lambda: widget.grab_focus())
+ GLib.idle_add(widget.grab_focus)
return True
def set_value(self, entry_name, value):
=====================================
gajim/gui_menu_builder.py
=====================================
--- a/gajim/gui_menu_builder.py
+++ b/gajim/gui_menu_builder.py
@@ -594,10 +594,6 @@ def get_transport_menu(contact, account):
menu.show_all()
return menu
-'''
-Build dynamic Application Menus
-'''
-
def get_singlechat_menu(control_id):
singlechat_menu = [
=====================================
scripts/dev/pre-push-tests.sh
=====================================
--- a/scripts/dev/pre-push-tests.sh
+++ b/scripts/dev/pre-push-tests.sh
@@ -1,5 +1,5 @@
mypy -p gajim.common.modules --follow-imports=skip
-pylint --jobs=2
--disable=C0103,C0302,C0330,C0411,C0412,C0413,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1128,E1133,E1136,R0201,R0901,R0904,R0913,R0916,R1702,R1706,R1711,R1716,W0104,W0105,W0108,W0109,W0123,W0143,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614,W0631,W0640,W1401,W1505
gajim
+pylint --jobs=2
--disable=C0103,C0302,C0330,C0411,C0412,C0413,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1128,E1133,E1136,R0201,R0901,R0904,R0913,R0916,R1702,R1706,R1711,R1716,W0109,W0123,W0143,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614,W0631,W0640,W1401,W1505
gajim
# C0103 invalid-name
# C0302 too-many-lines
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/c2828231bd217d59039b98676415d2e824cf89a4...457faf38067537735acdaa8b67a4c22eff0c6462
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/c2828231bd217d59039b98676415d2e824cf89a4...457faf38067537735acdaa8b67a4c22eff0c6462
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits