Fix chained-comparison pylint errors
This commit is contained in:
		
							parent
							
								
									20d3e981b9
								
							
						
					
					
						commit
						ee38f76004
					
				
					 3 changed files with 5 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -890,15 +890,13 @@ class MessageWindow:
 | 
			
		|||
            tab = self.notebook.get_tab_label(page)
 | 
			
		||||
            tab_alloc = tab.get_allocation()
 | 
			
		||||
            if horiz:
 | 
			
		||||
                if (x >= tab_alloc.x) and \
 | 
			
		||||
                (x <= (tab_alloc.x + tab_alloc.width)):
 | 
			
		||||
                if tab_alloc.x <= x <= (tab_alloc.x + tab_alloc.width):
 | 
			
		||||
                    page_num = i
 | 
			
		||||
                    if x >= tab_alloc.x + (tab_alloc.width / 2.0):
 | 
			
		||||
                        to_right = True
 | 
			
		||||
                    break
 | 
			
		||||
            else:
 | 
			
		||||
                if (y >= tab_alloc.y) and \
 | 
			
		||||
                (y <= (tab_alloc.y + tab_alloc.height)):
 | 
			
		||||
                if tab_alloc.y <= y <= (tab_alloc.y + tab_alloc.height):
 | 
			
		||||
                    page_num = i
 | 
			
		||||
 | 
			
		||||
                    if y > tab_alloc.y + (tab_alloc.height / 2.0):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3308,7 +3308,7 @@ class RosterWindow:
 | 
			
		|||
                    not event.get_state() & Gdk.ModifierType.CONTROL_MASK):
 | 
			
		||||
                # Don't handle double click if we press icon of a metacontact
 | 
			
		||||
                titer = model.get_iter(path)
 | 
			
		||||
                if x > x_min and x < x_min + 27 and type_ == 'contact' and \
 | 
			
		||||
                if x_min < x < x_min + 27 and type_ == 'contact' and \
 | 
			
		||||
                model.iter_has_child(titer):
 | 
			
		||||
                    if self.tree.row_expanded(path):
 | 
			
		||||
                        self.tree.collapse_row(path)
 | 
			
		||||
| 
						 | 
				
			
			@ -3328,7 +3328,7 @@ class RosterWindow:
 | 
			
		|||
                else:
 | 
			
		||||
                    self.expand_group_row(path)
 | 
			
		||||
 | 
			
		||||
            elif type_ == 'contact' and x > x_min and x < x_min + 27:
 | 
			
		||||
            elif type_ == 'contact' and x_min < x < x_min + 27:
 | 
			
		||||
                if self.tree.row_expanded(path):
 | 
			
		||||
                    self.tree.collapse_row(path)
 | 
			
		||||
                else:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
PYLINT=${PYLINT:-pylint}
 | 
			
		||||
 | 
			
		||||
"$PYLINT" --disable=C0103,C0302,C0330,C0411,C0412,C0413,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1128,E1133,E1136,R0201,R0901,R0904,R0913,R0916,R1702,R1716,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614 "$@"
 | 
			
		||||
"$PYLINT" --disable=C0103,C0302,C0330,C0411,C0412,C0413,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1128,E1133,E1136,R0201,R0901,R0904,R0913,R0916,R1702,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614 "$@"
 | 
			
		||||
 | 
			
		||||
# C0103 invalid-name
 | 
			
		||||
# C0302 too-many-lines
 | 
			
		||||
| 
						 | 
				
			
			@ -25,7 +25,6 @@ PYLINT=${PYLINT:-pylint}
 | 
			
		|||
# R0913 too-many-arguments
 | 
			
		||||
# R0916 too-many-boolean-expressions
 | 
			
		||||
# R1702 too-many-nested-blocks
 | 
			
		||||
# R1716 chained-comparison
 | 
			
		||||
# W0201 attribute-defined-outside-init
 | 
			
		||||
# W0212 protected-access
 | 
			
		||||
# W0221 arguments-differ
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue