mirror of https://github.com/zulip/zulip.git
mypy: Remove type ignores for python 3 stubs now present in typeshed.
Namely: * posix stubs * readfp stub
This commit is contained in:
parent
5f673f5820
commit
62a1c3443d
|
@ -85,7 +85,7 @@ def process_response_error(e):
|
|||
response_content = e.read()
|
||||
response_data = json.loads(response_content.decode('utf8'))
|
||||
print(response_data['msg'])
|
||||
exit(posix.EX_NOUSER) # type: ignore # There are no stubs for posix in python 3
|
||||
exit(posix.EX_NOUSER)
|
||||
else:
|
||||
print("4.4.2 Connection dropped: Internal server error.")
|
||||
exit(1)
|
||||
|
@ -95,12 +95,12 @@ def send_email_mirror(rcpt_to, shared_secret, host, url, test, verify_ssl):
|
|||
# type: (str, str, str, str, bool, bool) -> None
|
||||
if not rcpt_to:
|
||||
print("5.1.1 Bad destination mailbox address: No missed message email address.")
|
||||
exit(posix.EX_NOUSER) # type: ignore # There are no stubs for posix in python 3
|
||||
exit(posix.EX_NOUSER)
|
||||
msg_text = sys.stdin.read(MAX_ALLOWED_PAYLOAD + 1)
|
||||
if len(msg_text) > MAX_ALLOWED_PAYLOAD:
|
||||
# We're not at EOF, reject large mail.
|
||||
print("5.3.4 Message too big for system: Max size is 25MiB")
|
||||
exit(posix.EX_DATAERR) # type: ignore # There are no stubs for posix in python 3
|
||||
exit(posix.EX_DATAERR)
|
||||
|
||||
secrets_file = RawConfigParser()
|
||||
secrets_file.read("/etc/zulip/zulip-secrets.conf")
|
||||
|
|
|
@ -66,7 +66,7 @@ def load_bot_config_template(bot: str) -> Dict[str, str]:
|
|||
if os.path.isfile(config_path):
|
||||
config = configparser.ConfigParser()
|
||||
with open(config_path) as conf:
|
||||
config.readfp(conf) # type: ignore # readfp->read_file in python 3, so not in stubs
|
||||
config.readfp(conf)
|
||||
return dict(config.items(bot))
|
||||
else:
|
||||
return dict()
|
||||
|
|
Loading…
Reference in New Issue