mirror of https://github.com/zulip/zulip.git
refactoring: Remove unused assignment on ensure_stream.
There were two instances of `ensure_stream` being called and assigned to a variable with the variable not being used elsewhere. pyflakes picked up on this (where it didn't in the previous version likely due to tuple unpacking), so the the variable assignment has been replaced with a call to `ensure_stream`.
This commit is contained in:
parent
3396cfc2ef
commit
d857f26cd3
|
@ -1950,7 +1950,7 @@ def _internal_prep_message(realm: Realm,
|
|||
raise RuntimeError("None is not a valid realm for internal_prep_message!")
|
||||
|
||||
if addressee.is_stream():
|
||||
stream = ensure_stream(realm, addressee.stream_name())
|
||||
ensure_stream(realm, addressee.stream_name())
|
||||
|
||||
try:
|
||||
return check_message(sender, get_client("Internal"), addressee,
|
||||
|
|
|
@ -849,7 +849,7 @@ class DefaultStreamTest(ZulipTestCase):
|
|||
user_profile = self.example_user('hamlet')
|
||||
do_change_is_admin(user_profile, True)
|
||||
stream_name = 'stream ADDED via api'
|
||||
stream = ensure_stream(user_profile.realm, stream_name)
|
||||
ensure_stream(user_profile.realm, stream_name)
|
||||
result = self.client_post('/json/default_streams', dict(stream_name=stream_name))
|
||||
self.assert_json_success(result)
|
||||
self.assertTrue(stream_name in self.get_default_stream_names(user_profile.realm))
|
||||
|
|
Loading…
Reference in New Issue