Remove unreachable code, and simplify is_valid_bool.
This commit is contained in:
		
							parent
							
								
									f961e0be9a
								
							
						
					
					
						commit
						71c01ad03e
					
				
					 1 changed files with 7 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -605,16 +605,14 @@ class Config:
 | 
			
		|||
    def is_valid_bool(self, val):
 | 
			
		||||
        if val == 'True':
 | 
			
		||||
            return True
 | 
			
		||||
        elif val == 'False':
 | 
			
		||||
        if val == 'False':
 | 
			
		||||
            return False
 | 
			
		||||
        else:
 | 
			
		||||
            ival = self.is_valid_int(val)
 | 
			
		||||
            if ival:
 | 
			
		||||
                return True
 | 
			
		||||
            elif ival is None:
 | 
			
		||||
                return None
 | 
			
		||||
            return False
 | 
			
		||||
        return None
 | 
			
		||||
        ival = self.is_valid_int(val)
 | 
			
		||||
        if ival:
 | 
			
		||||
            return True
 | 
			
		||||
        if ival is None:
 | 
			
		||||
            return None
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
    def is_valid_string(self, val):
 | 
			
		||||
        return val
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue