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

Set store=False as default in load_extension(s) #1520

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

NeloBlivion
Copy link
Member

@NeloBlivion NeloBlivion commented Jul 22, 2022

Makes store=False the default in load_extension/load_extensions, which keeps the behaviour inline with previous versions.

Summary

With #1423, extension loading was reworked to allow loading entire folders at once. This is a very convenient addition, however it introduced the store kwarg which decides whether load_extension will raise an error or not if a cog fails to load.

In the past load_extension has always raised an error when this happens, however with this PR the default has been set as store=True, which instead stores the error in a dict for the user to parse themselves. While this technically isn't a breaking change since it still functions, the behaviour is different enough from before to cause confusion with users who updated: without setting the store kwarg, cogs that have errors will appear to load correctly if you haven't accounted for the change. Neither was this change made note of at all in any update notes.

As such, I believe it'd be more appropriate for store=False to be the default to be inline with previous behaviorr.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting, examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.

Makes store=False the default in load_extension, which keeps the behaviour inline with previous versions.
Copy link
Contributor

@baronkobama baronkobama left a comment

Choose a reason for hiding this comment

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

Good idea, LGTM.

Copy link
Contributor

@EmmmaTech EmmmaTech left a comment

Choose a reason for hiding this comment

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

k

@Dorukyum Dorukyum merged commit 0841e7f into Pycord-Development:master Jul 25, 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.

5 participants