pep8: Fix E129 violations
This commit is contained in:
		
							parent
							
								
									dc48a41efe
								
							
						
					
					
						commit
						47488217b1
					
				
					 4 changed files with 9 additions and 9 deletions
				
			
		|  | @ -67,7 +67,7 @@ def zulip_to_jid(email, jabber_domain): | ||||||
|     jid = JID(email, domain=jabber_domain) |     jid = JID(email, domain=jabber_domain) | ||||||
|     if (options.zulip_email_suffix |     if (options.zulip_email_suffix | ||||||
|         and options.zulip_email_suffix in jid.username |         and options.zulip_email_suffix in jid.username | ||||||
|         and not jid.username.endswith("-bot")): |             and not jid.username.endswith("-bot")): | ||||||
|         jid.username = jid.username.rpartition(options.zulip_email_suffix)[0] |         jid.username = jid.username.rpartition(options.zulip_email_suffix)[0] | ||||||
|     return jid |     return jid | ||||||
| 
 | 
 | ||||||
|  | @ -384,7 +384,7 @@ option does not affect login credentials.'''.replace("\n", " ")) | ||||||
|     for option in ("jid", "jabber_password", "conference_domain", "mode", "zulip_email_suffix", |     for option in ("jid", "jabber_password", "conference_domain", "mode", "zulip_email_suffix", | ||||||
|                    "jabber_server_address", "jabber_server_port"): |                    "jabber_server_address", "jabber_server_port"): | ||||||
|         if (getattr(options, option) is None |         if (getattr(options, option) is None | ||||||
|             and config.has_option("jabber_mirror", option)): |                 and config.has_option("jabber_mirror", option)): | ||||||
|             setattr(options, option, config.get("jabber_mirror", option)) |             setattr(options, option, config.get("jabber_mirror", option)) | ||||||
| 
 | 
 | ||||||
|     for option in ("no_use_tls",): |     for option in ("no_use_tls",): | ||||||
|  |  | ||||||
|  | @ -100,7 +100,7 @@ def unwrap_lines(body): | ||||||
|     for line in lines[1:]: |     for line in lines[1:]: | ||||||
|         line = line.rstrip() |         line = line.rstrip() | ||||||
|         if (re.match(r'^\W', line, flags=re.UNICODE) |         if (re.match(r'^\W', line, flags=re.UNICODE) | ||||||
|             and re.match(r'^\W', previous_line, flags=re.UNICODE)): |                 and re.match(r'^\W', previous_line, flags=re.UNICODE)): | ||||||
|             result += previous_line + "\n" |             result += previous_line + "\n" | ||||||
|         elif (line == "" or |         elif (line == "" or | ||||||
|               previous_line == "" or |               previous_line == "" or | ||||||
|  | @ -205,7 +205,7 @@ def update_subscriptions(): | ||||||
|     for stream in public_streams: |     for stream in public_streams: | ||||||
|         zephyr_class = stream.encode("utf-8") |         zephyr_class = stream.encode("utf-8") | ||||||
|         if (options.shard is not None and |         if (options.shard is not None and | ||||||
|             not hashlib.sha1(zephyr_class).hexdigest().startswith(options.shard)): |                 not hashlib.sha1(zephyr_class).hexdigest().startswith(options.shard)): | ||||||
|             # This stream is being handled by a different zephyr_mirror job. |             # This stream is being handled by a different zephyr_mirror job. | ||||||
|             continue |             continue | ||||||
|         if zephyr_class in current_zephyr_subs: |         if zephyr_class in current_zephyr_subs: | ||||||
|  | @ -369,7 +369,7 @@ def process_notice(notice, log): | ||||||
|         logger.debug("Skipping message we got from Zulip!") |         logger.debug("Skipping message we got from Zulip!") | ||||||
|         return |         return | ||||||
|     if (zephyr_class == "mail" and notice.instance.lower() == "inbox" and is_personal and |     if (zephyr_class == "mail" and notice.instance.lower() == "inbox" and is_personal and | ||||||
|         not options.forward_mail_zephyrs): |             not options.forward_mail_zephyrs): | ||||||
|         # Only forward mail zephyrs if forwarding them is enabled. |         # Only forward mail zephyrs if forwarding them is enabled. | ||||||
|         return |         return | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -95,7 +95,7 @@ def send_bot_message(oldrev, newrev, refname): | ||||||
|     old_head = oldrev[:12] |     old_head = oldrev[:12] | ||||||
| 
 | 
 | ||||||
|     if (oldrev == '0000000000000000000000000000000000000000' or |     if (oldrev == '0000000000000000000000000000000000000000' or | ||||||
|         newrev == '0000000000000000000000000000000000000000'): |             newrev == '0000000000000000000000000000000000000000'): | ||||||
|         # New branch pushed or old branch removed |         # New branch pushed or old branch removed | ||||||
|         added = '' |         added = '' | ||||||
|         removed = '' |         removed = '' | ||||||
|  |  | ||||||
|  | @ -81,7 +81,7 @@ class CountingBackoff(object): | ||||||
|         # type: () -> None |         # type: () -> None | ||||||
|         if (self.timeout_success_equivalent is not None |         if (self.timeout_success_equivalent is not None | ||||||
|             and self.last_attempt_time != 0 |             and self.last_attempt_time != 0 | ||||||
|             and time.time() - self.last_attempt_time > self.timeout_success_equivalent): |                 and time.time() - self.last_attempt_time > self.timeout_success_equivalent): | ||||||
|             self.number_of_retries = 0 |             self.number_of_retries = 0 | ||||||
| 
 | 
 | ||||||
| class RandomExponentialBackoff(CountingBackoff): | class RandomExponentialBackoff(CountingBackoff): | ||||||
|  | @ -171,7 +171,7 @@ def get_default_config_filename(): | ||||||
|     # type: () -> str |     # type: () -> str | ||||||
|     config_file = os.path.join(os.environ["HOME"], ".zuliprc") |     config_file = os.path.join(os.environ["HOME"], ".zuliprc") | ||||||
|     if (not os.path.exists(config_file) and |     if (not os.path.exists(config_file) and | ||||||
|         os.path.exists(os.path.join(os.environ["HOME"], ".humbugrc"))): |             os.path.exists(os.path.join(os.environ["HOME"], ".humbugrc"))): | ||||||
|         raise RuntimeError("The Zulip API configuration file is now ~/.zuliprc; please run:\n\n" |         raise RuntimeError("The Zulip API configuration file is now ~/.zuliprc; please run:\n\n" | ||||||
|                            "  mv ~/.humbugrc ~/.zuliprc\n") |                            "  mv ~/.humbugrc ~/.zuliprc\n") | ||||||
|     return config_file |     return config_file | ||||||
|  | @ -366,7 +366,7 @@ class Client(object): | ||||||
|                 # want the later exception handlers to deal with any |                 # want the later exception handlers to deal with any | ||||||
|                 # non-timeout other SSLErrors |                 # non-timeout other SSLErrors | ||||||
|                 if (isinstance(e, requests.exceptions.SSLError) and |                 if (isinstance(e, requests.exceptions.SSLError) and | ||||||
|                     str(e) != "The read operation timed out"): |                         str(e) != "The read operation timed out"): | ||||||
|                     raise |                     raise | ||||||
|                 if longpolling: |                 if longpolling: | ||||||
|                     # When longpolling, we expect the timeout to fire, |                     # When longpolling, we expect the timeout to fire, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bulat22101
						bulat22101