Philipp Hörist pushed to branch master at gajim / gajim

Commits:

6 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -19,7 +19,7 @@ run-mypy:
    19 19
     run-pylint:
    
    20 20
       stage: test
    
    21 21
       script:
    
    22
    -    - 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
    
    22
    +    - 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,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614,W0631,W0640,W1401,W1505 gajim
    
    23 23
     
    
    24 24
     run-build:
    
    25 25
       stage: build
    

  • gajim/common/connection.py
    ... ... @@ -1031,7 +1031,7 @@ class Connection(CommonConnection, ConnectionHandlers):
    1031 1031
             nbxmpp.dispatcher_nb.DEFAULT_TIMEOUT_SECONDS = \
    
    1032 1032
                 self.try_connecting_for_foo_secs
    
    1033 1033
             # FIXME: this is a hack; need a better way
    
    1034
    -        if self.on_connect_success == self._on_new_account:
    
    1034
    +        if self.on_connect_success == self._on_new_account:  # pylint: disable=W0143
    
    1035 1035
                 con.RegisterDisconnectHandler(self._on_new_account)
    
    1036 1036
     
    
    1037 1037
             if self.client_cert and app.config.get_per('accounts', self.name,
    

  • gajim/gui_interface.py
    ... ... @@ -1873,18 +1873,19 @@ class Interface:
    1873 1873
     ################################################################################
    
    1874 1874
     
    
    1875 1875
         def join_gc_room(self, account, room_jid, nick, password, minimize=False,
    
    1876
    -    is_continued=False):
    
    1876
    +                     is_continued=False):
    
    1877 1877
             """
    
    1878 1878
             Join the room immediately
    
    1879 1879
             """
    
    1880 1880
     
    
    1881 1881
             if app.contacts.get_contact(account, room_jid) and \
    
    1882 1882
             not app.contacts.get_contact(account, room_jid).is_groupchat():
    
    1883
    -            ErrorDialog(_('This is not a group chat'),
    
    1883
    +            ErrorDialog(
    
    1884
    +                _('This is not a group chat'),
    
    1884 1885
                     _('%(room_jid)s is already in your roster. Please check '
    
    1885
    -                'if %(room_jid)s is a correct group chat name. If it is, '
    
    1886
    -                'delete it from your roster and try joining the group chat '
    
    1887
    -                'again.') % {'room_jid': room_jid, 'room_jid': room_jid})
    
    1886
    +                  'if %(room_jid)s is a correct group chat name. If it is, '
    
    1887
    +                  'delete it from your roster and try joining the group chat '
    
    1888
    +                  'again.') % {'room_jid': room_jid})
    
    1888 1889
                 return
    
    1889 1890
     
    
    1890 1891
             if not nick:
    

  • gajim/gui_menu_builder.py
    ... ... @@ -41,7 +41,7 @@ def build_resources_submenu(contacts, account, action, room_jid=None,
    41 41
             item = Gtk.MenuItem.new_with_label(
    
    42 42
                 '%s (%s)' % (c.resource, str(c.priority)))
    
    43 43
             sub_menu.append(item)
    
    44
    -
    
    44
    +        # pylint: disable=W0143
    
    45 45
             if action == roster.on_invite_to_room:
    
    46 46
                 item.connect('activate', action, [(c, account)], room_jid,
    
    47 47
                         room_account, c.resource)
    

  • gajim/htmltextview.py
    ... ... @@ -183,7 +183,7 @@ INLINE = INLINE_PHRASAL.union(INLINE_PRES).union(INLINE_STRUCT)
    183 183
     LIST_ELEMS = set('dl, ol, ul'.split(', '))
    
    184 184
     
    
    185 185
     for _name in BLOCK_HEAD:
    
    186
    -    _num = eval(_name[1])
    
    186
    +    _num = int(_name[1])
    
    187 187
         _header_size = (_num - 1) // 2
    
    188 188
         _weight = (_num - 1) % 2
    
    189 189
         _element_styles[_name] = '; font-size: %s; %s' % (('large', 'medium', 'small')[_header_size],
    

  • scripts/dev/pre-push-tests.sh
    1 1
     mypy -p gajim.common.modules --follow-imports=skip
    
    2
    -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
    
    2
    +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,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614,W0631,W0640,W1401,W1505 gajim
    
    3 3
     
    
    4 4
     # C0103 invalid-name
    
    5 5
     # C0302 too-many-lines