mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
python: Normalize quotes with Black.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
11741543da
commit
6e4c3e41dc
@@ -9,36 +9,36 @@ from django.utils.translation import ugettext_lazy
|
||||
from zerver.models import UserHotspot, UserProfile
|
||||
|
||||
ALL_HOTSPOTS: Dict[str, Dict[str, Promise]] = {
|
||||
'intro_reply': {
|
||||
'title': ugettext_lazy('Reply to a message'),
|
||||
'description': ugettext_lazy('Click anywhere on a message to reply.'),
|
||||
"intro_reply": {
|
||||
"title": ugettext_lazy("Reply to a message"),
|
||||
"description": ugettext_lazy("Click anywhere on a message to reply."),
|
||||
},
|
||||
'intro_streams': {
|
||||
'title': ugettext_lazy('Catch up on a stream'),
|
||||
'description': ugettext_lazy(
|
||||
'Messages sent to a stream are seen by everyone subscribed '
|
||||
'to that stream. Try clicking on one of the stream links below.'
|
||||
"intro_streams": {
|
||||
"title": ugettext_lazy("Catch up on a stream"),
|
||||
"description": ugettext_lazy(
|
||||
"Messages sent to a stream are seen by everyone subscribed "
|
||||
"to that stream. Try clicking on one of the stream links below."
|
||||
),
|
||||
},
|
||||
'intro_topics': {
|
||||
'title': ugettext_lazy('Topics'),
|
||||
'description': ugettext_lazy(
|
||||
'Every message has a topic. Topics keep conversations '
|
||||
'easy to follow, and make it easy to reply to conversations that start '
|
||||
'while you are offline.'
|
||||
"intro_topics": {
|
||||
"title": ugettext_lazy("Topics"),
|
||||
"description": ugettext_lazy(
|
||||
"Every message has a topic. Topics keep conversations "
|
||||
"easy to follow, and make it easy to reply to conversations that start "
|
||||
"while you are offline."
|
||||
),
|
||||
},
|
||||
'intro_gear': {
|
||||
'title': ugettext_lazy('Settings'),
|
||||
'description': ugettext_lazy(
|
||||
'Go to Settings to configure your notifications and display settings.'
|
||||
"intro_gear": {
|
||||
"title": ugettext_lazy("Settings"),
|
||||
"description": ugettext_lazy(
|
||||
"Go to Settings to configure your notifications and display settings."
|
||||
),
|
||||
},
|
||||
'intro_compose': {
|
||||
'title': ugettext_lazy('Compose'),
|
||||
'description': ugettext_lazy(
|
||||
'Click here to start a new conversation. Pick a topic '
|
||||
'(2-3 words is best), and give it a go!'
|
||||
"intro_compose": {
|
||||
"title": ugettext_lazy("Compose"),
|
||||
"description": ugettext_lazy(
|
||||
"Click here to start a new conversation. Pick a topic "
|
||||
"(2-3 words is best), and give it a go!"
|
||||
),
|
||||
},
|
||||
}
|
||||
@@ -53,10 +53,10 @@ def get_next_hotspots(user: UserProfile) -> List[Dict[str, object]]:
|
||||
if settings.ALWAYS_SEND_ALL_HOTSPOTS:
|
||||
return [
|
||||
{
|
||||
'name': hotspot,
|
||||
'title': str(ALL_HOTSPOTS[hotspot]['title']),
|
||||
'description': str(ALL_HOTSPOTS[hotspot]['description']),
|
||||
'delay': 0,
|
||||
"name": hotspot,
|
||||
"title": str(ALL_HOTSPOTS[hotspot]["title"]),
|
||||
"description": str(ALL_HOTSPOTS[hotspot]["description"]),
|
||||
"delay": 0,
|
||||
}
|
||||
for hotspot in ALL_HOTSPOTS
|
||||
]
|
||||
@@ -65,21 +65,21 @@ def get_next_hotspots(user: UserProfile) -> List[Dict[str, object]]:
|
||||
return []
|
||||
|
||||
seen_hotspots = frozenset(
|
||||
UserHotspot.objects.filter(user=user).values_list('hotspot', flat=True)
|
||||
UserHotspot.objects.filter(user=user).values_list("hotspot", flat=True)
|
||||
)
|
||||
for hotspot in ['intro_reply', 'intro_streams', 'intro_topics', 'intro_gear', 'intro_compose']:
|
||||
for hotspot in ["intro_reply", "intro_streams", "intro_topics", "intro_gear", "intro_compose"]:
|
||||
if hotspot not in seen_hotspots:
|
||||
return [
|
||||
{
|
||||
'name': hotspot,
|
||||
'title': str(ALL_HOTSPOTS[hotspot]['title']),
|
||||
'description': str(ALL_HOTSPOTS[hotspot]['description']),
|
||||
'delay': 0.5,
|
||||
"name": hotspot,
|
||||
"title": str(ALL_HOTSPOTS[hotspot]["title"]),
|
||||
"description": str(ALL_HOTSPOTS[hotspot]["description"]),
|
||||
"delay": 0.5,
|
||||
}
|
||||
]
|
||||
|
||||
user.tutorial_status = UserProfile.TUTORIAL_FINISHED
|
||||
user.save(update_fields=['tutorial_status'])
|
||||
user.save(update_fields=["tutorial_status"])
|
||||
return []
|
||||
|
||||
|
||||
@@ -91,4 +91,4 @@ def copy_hotpots(source_profile: UserProfile, target_profile: UserProfile) -> No
|
||||
|
||||
target_profile.tutorial_status = source_profile.tutorial_status
|
||||
target_profile.onboarding_steps = source_profile.onboarding_steps
|
||||
target_profile.save(update_fields=['tutorial_status', 'onboarding_steps'])
|
||||
target_profile.save(update_fields=["tutorial_status", "onboarding_steps"])
|
||||
|
||||
Reference in New Issue
Block a user