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

Integrate and modify utils module from PygameCommunityBot, add initialization code and config helper module #3

Merged
merged 27 commits into from
Mar 19, 2022

Conversation

Mega-JC
Copy link
Member

@Mega-JC Mega-JC commented Mar 18, 2022

We can squash merge this one.

@Mega-JC Mega-JC changed the title Integrate events and utils modules, add initialization code and config file Integrate and modify events and utils modules from PygameCommunityBot, add initialization code and config file Mar 18, 2022
)

if config.client is None:
config.client = client
Copy link
Member

Choose a reason for hiding this comment

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

the bit of code above this line in this function seems to be repeated here and also in utils. How about extracting this functionality into something like _init()

Copy link
Member Author

@Mega-JC Mega-JC Mar 18, 2022

Choose a reason for hiding this comment

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

This is intentional, splitting off this two-liner into a separate function would increase code complexity for a small gain IMO. I admit that it is repetitive, but it feels easier to reason about this way.

@Mega-JC Mega-JC changed the title Integrate and modify events and utils modules from PygameCommunityBot, add initialization code and config file Integrate and modify utils module from PygameCommunityBot, add initialization code and config helper module Mar 18, 2022
@Mega-JC Mega-JC merged commit 5a12577 into pygame-community:main Mar 19, 2022
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