mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	Fixed RET503 (implicit-return): Missing explicit return at the end of function able to return non-None value
				
					
				
			This commit is contained in:
		
							parent
							
								
									c585c1ecf6
								
							
						
					
					
						commit
						845393b6e0
					
				@ -636,6 +636,7 @@ def print_time_table(labels, data, do_print=True):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if do_print:
 | 
					    if do_print:
 | 
				
			||||||
        print("\n".join(lines))
 | 
					        print("\n".join(lines))
 | 
				
			||||||
 | 
					        return None
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        return lines
 | 
					        return lines
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -491,6 +491,7 @@ def add_mail_alias(address, forwards_to, permitted_senders, env, update_if_exist
 | 
				
			|||||||
	if do_kick:
 | 
						if do_kick:
 | 
				
			||||||
		# Update things in case any new domains are added.
 | 
							# Update things in case any new domains are added.
 | 
				
			||||||
		return kick(env, return_status)
 | 
							return kick(env, return_status)
 | 
				
			||||||
 | 
						return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def remove_mail_alias(address, env, do_kick=True):
 | 
					def remove_mail_alias(address, env, do_kick=True):
 | 
				
			||||||
	# convert Unicode domain to IDNA
 | 
						# convert Unicode domain to IDNA
 | 
				
			||||||
@ -506,6 +507,7 @@ def remove_mail_alias(address, env, do_kick=True):
 | 
				
			|||||||
	if do_kick:
 | 
						if do_kick:
 | 
				
			||||||
		# Update things in case any domains are removed.
 | 
							# Update things in case any domains are removed.
 | 
				
			||||||
		return kick(env, "alias removed")
 | 
							return kick(env, "alias removed")
 | 
				
			||||||
 | 
						return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def add_auto_aliases(aliases, env):
 | 
					def add_auto_aliases(aliases, env):
 | 
				
			||||||
	conn, c = open_database(env, with_connection=True)
 | 
						conn, c = open_database(env, with_connection=True)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user