Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MOTD about duplication #202

Merged
merged 1 commit into from
May 10, 2023
Merged

Add MOTD about duplication #202

merged 1 commit into from
May 10, 2023

Conversation

reinhardt
Copy link
Contributor

@reinhardt reinhardt commented May 9, 2023

I'm reusing NewsletterSetting here although the new setting has nothing to do with the newsletter. I'm also not happy that we have to pass all the known values to query the settings. I'm working on a proposal to improve that (#203).

syslabcom/scrum#1137

@reinhardt reinhardt force-pushed the scrum-1137-duplication-motd branch from af145a0 to fb4cac3 Compare May 9, 2023 08:58
@reinhardt reinhardt requested a review from ale-rt May 9, 2023 09:01
@reinhardt reinhardt mentioned this pull request May 9, 2023
),
"disabled_key": "call-for-action-banner-disabled",
},
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the code, it looks like a dict of dicts would work better:

`duplication-banner` : {...},
`call-for-action-banner` : {...},

This would save you this to cycle over the messages all the time.
E.g.: in [message["disabled_key"] for message in self.all_messages] will become in self.all_messages.

But it looks like also other parts of the code would profit from this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two lines that cycle over the messages like this. One of them is due to the strange situation with the settings. That leaves only one line. I hesitate to restructure the data just for that one line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well as mentioned it is not just that...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You vaguely mentioned it but did not specify anything else.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neverm ind :)

@reinhardt reinhardt merged commit b52dc51 into main May 10, 2023
@reinhardt reinhardt deleted the scrum-1137-duplication-motd branch May 10, 2023 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants