Skip to content

Commit

Permalink
mypy.ini: Move purge_queue exclusion into re-architecting section.
Browse files Browse the repository at this point in the history
  • Loading branch information
neiljp authored and timabbott committed Mar 25, 2018
1 parent 3b28d6a commit de76297
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ strict_optional = False
[mypy-zerver.migrations.0077_add_file_name_field_to_realm_emoji] #73: error: Argument 2 to "upload_files" of "Uploader" has incompatible type "Optional[bytes]"; expected "bytes"
strict_optional = False

[mypy-zerver/management/commands/purge_queue] #24: error: Item "None" of "Optional[Any]" has no attribute "queue_purge"
strict_optional = False
[mypy-zerver/management/commands/check_redis] #32: error: Incompatible types in assignment (expression has type "None", variable has type "UserProfile")
strict_optional = False
[mypy-zerver.management.commands.create_user] #86: error: Item "None" of "Optional[str]" has no attribute "encode"
Expand All @@ -93,6 +91,9 @@ strict_optional = False

[mypy-zerver.lib.queue] # Delayed setup of SimpleQueueClient.channel (Optional)
strict_optional = False
[mypy-zerver/management/commands/purge_queue] #24: error: Item "None" of "Optional[Any]" has no attribute "queue_purge"
strict_optional = False

[mypy-zerver.tornado.handlers] # Delayed setup of ASyncDjangoHandler._request_middleware (Optional), line 200 error
strict_optional = False

Expand Down
3 changes: 2 additions & 1 deletion zerver/management/commands/create_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def handle(self, *args: Any, **options: Any) -> None:
if 'password_file' in options:
pw = open(options['password_file'], 'r').read()
else:
pw = initial_password(email).encode()
user_initial_password = initial_password(email)
pw = user_initial_password.encode()
notify_new_user(do_create_user(email, pw,
realm, full_name, email_to_username(email)),
internal=True)
Expand Down

0 comments on commit de76297

Please sign in to comment.