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

Prefer force_registration=true in Config documentation #6259

Conversation

Jackenmen
Copy link
Member

Description of the changes

Adds force_registration=True to all Config.get_conf() usage examples with the exception of "V2 Data Usage" section where no defaults are registered and this may be unwanted.

Additionally, I did a slight rephrasing and clarification to the documentation that mentions force_registration=True.

Have the changes in this PR been tested?

Yes

@Jackenmen Jackenmen added the Type: Enhancement Something meant to enhance existing Red features. label Oct 14, 2023
@Jackenmen Jackenmen added this to the 3.5.6 milestone Oct 14, 2023
@github-actions github-actions bot added Category: Core - API - Config This is related to the `redbot.core.config` module and `redbot.core.drivers` package. Docs-only labels Oct 14, 2023
Copy link
Member

@Flame442 Flame442 left a comment

Choose a reason for hiding this comment

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

The V2 Data Usage block example does not have force_registration added to it. Do we even still need that block, and does it have a reason to not use force_registration?

docs/framework_config.rst Outdated Show resolved Hide resolved
docs/framework_config.rst Outdated Show resolved Hide resolved
@@ -304,7 +305,7 @@ the built-in Economy credits::

class Pets(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, 1234567890)
self.config = Config.get_conf(self, 1234567890, force_registration=True)
Copy link
Member

Choose a reason for hiding this comment

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

Should this use identifier as a kwarg, to match other examples?

Copy link
Member Author

Choose a reason for hiding this comment

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

Variety in examples shows that there are multiple valid ways of using the method - seems fine to me.

@Flame442 Flame442 self-assigned this Nov 6, 2023
Jackenmen and others added 2 commits November 6, 2023 22:17
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
@Flame442 Flame442 merged commit 8997bf6 into Cog-Creators:V3/develop Nov 6, 2023
17 checks passed
@red-githubbot red-githubbot bot added the Changelog Entry: Pending Changelog entry for this PR hasn't been added by repo maintainers yet. label Nov 6, 2023
@Jackenmen Jackenmen deleted the prefer-force-registration-in-config-docs branch November 6, 2023 22:43
@Jackenmen Jackenmen added Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. and removed Changelog Entry: Pending Changelog entry for this PR hasn't been added by repo maintainers yet. labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - API - Config This is related to the `redbot.core.config` module and `redbot.core.drivers` package. Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. Docs-only Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants