minor: Clean up args for apply_events.

I eliminate the defaults, since the existing code
was already specificying values for most things.

I move all the booleans to the bottom for both
parameters and arguments.

I require explicit keywords for everything but
user_profile (which is now first).

And, finally, I format the code in a more
diff-friendly manner.
This commit is contained in:
Steve Howell
2021-01-19 14:52:45 +00:00
committed by Tim Abbott
parent f2586d2f9b
commit e42baf9e13
2 changed files with 28 additions and 11 deletions

View File

@@ -261,10 +261,15 @@ class BaseAction(ZulipTestCase):
initial_state = copy.deepcopy(hybrid_state)
post_process_state(self.user_profile, initial_state, notification_settings_null)
before = orjson.dumps(initial_state)
apply_events(hybrid_state, events, self.user_profile,
client_gravatar=client_gravatar,
slim_presence=slim_presence,
include_subscribers=include_subscribers)
apply_events(
self.user_profile,
state=hybrid_state,
events=events,
fetch_event_types=None,
client_gravatar=client_gravatar,
slim_presence=slim_presence,
include_subscribers=include_subscribers,
)
post_process_state(self.user_profile, hybrid_state, notification_settings_null)
after = orjson.dumps(hybrid_state)